cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Meyer - KMZ" <>
Subject Re: Is it possible/easy to integrate cayenne with other frameworks?
Date Wed, 07 Dec 2011 08:11:38 GMT
Dear John,

Thanks for your response.

On 6 Dec 2011 at 9:04, John Huss wrote:

> You can use Cayenne without running the modeler, but it would be rather
> cumbersome since you would have to create the whole model programmatically
> at runtime each time.  

So Cayenne does not introspect the POJOs?

I suppose I can work with having to run a config tool every now and 
then, as design changes need to be handled.

> And normally you would generate custom classes for your Entities
> (objects), but without having a pre-existing model you would just
> have to use CayenneDataObject directly which will force you to
> access values by name instead of via getters and setters. If those
> requirements are acceptable, then it could work. 

Isis does not generate code - it uses the users POJOs as is, with extra 
methods or annotations to affect behaviour, visibility etc.

I was hoping that I could merely require that Cayenne-managed 
POJOs extend a Cayenne-compatible base class, and no more, and 
that only getXXX/setXXX methods would be used to map XXX into the 
ORM. In Isis, a getXXX-only implies a read-only property, and setYYY 
only is for injecting services. Neither of which are passed to the Isis 

> The "update" method might be tricker.  Cayenne saves all changes to the
> entire object graph at once; you can't just save one object, you save all
> changes to the related objects that are loaded and modified.  If this is
> different than the "update" concept in Isis then it may be a problem.

No problem - Isis does something similar. If an object is transient, all 
properties are "walked" and persisted. But objects in the entire graph 
are not persisted if they have not changed.


View raw message