cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Relationships of unsaved object
Date Thu, 05 Jun 2008 14:11:27 GMT
As Ari said, we did come from a different world. We will have the  
option in 3.0 to build your graph first, and register it later, but  
currently you have to register objects before setting the  
relationships. (as a side note, I wouldn't yet recommend using POJO  
enhancer - too raw).

Andrus

On Jun 5, 2008, at 5:06 PM, Aristedes Maniatis wrote:

>
> On 05/06/2008, at 11:48 PM, Michał Morzywołek wrote:
>
>> As far as i understand Hibernate was created to fit DAO model - and  
>> it works
>> perfectly.
>> Cayenne seems to have very different architecture in this matter.  
>> With the
>> need of registering the new objects in Cayenne (at the start) it's  
>> hard to
>> create perfectly "sterile" DAO layer.
>> It is possible but its much slower then using newObject() method  
>> and just
>> "mixing it all".
>
>
> Not sure what you mean by sterile, but Cayenne has a different  
> history and different strengths to Hibernate. Registering new  
> objects from the point of instantiation actually does have some  
> advantages and I think it is a pattern you'll quickly grow to like.  
> But yes, it is different and is not the JPA/Hibernate way. It means  
> that objects are always tracked by Cayenne through their entire  
> life, and they are always attached to a context.
>
> If you really want, there is a POJO enhancer available in Cayenne 3  
> as part of the JPA compliance work. Documentation is still a bit  
> thin at this time.
>
> Ari
>
>
> -------------------------->
> ish
> http://www.ish.com.au
> Level 1, 30 Wilson Street Newtown 2042 Australia
> phone +61 2 9550 5001   fax +61 2 9550 4001
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>
>
>


Mime
View raw message