You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really sure where to ask this, but here it goes. Sorry if this is not the right place.
I have some requests that have to make complex actions so I would like to use cayenne directly to do the hardwork and then use arrest to send the objet as a response.
Something like this.
//get new context from the existing runtime
ObjectContext cont = MyBootApp.cayenneRuntime.newContext();
//get a object from db
var user = SQLSelect.query(User.class, "select * from user where id = $iduser")
.param("iduser", userid)
.selectOne(cont);
//do my stuff (simple example)
user.getCars().forEach( car -> {
car.setStolen(true);
mailService.sendLocation(user.getmail(), car.getLastLocation());
//etc...
});
//not real code here, just what I would like to do
AgRequest request = AgJaxrs.request(config)
.addIncludes(includes) //possible set includes and excludes like always
.build();
return AgJaxrs.parseObject(user)
.request(request)
.get();
is it possible to do something like this?
The text was updated successfully, but these errors were encountered:
Not really sure where to ask this, but here it goes. Sorry if this is not the right place.
I have some requests that have to make complex actions so I would like to use cayenne directly to do the hardwork and then use arrest to send the objet as a response.
Something like this.
is it possible to do something like this?
The text was updated successfully, but these errors were encountered: