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
This archive was generated by hypermail 2.0.0 : Thu Jun 05 2008 - 10:07:01 EDT