Re: Relationships of unsaved object

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jun 05 2008 - 10:11:27 EDT

  • Next message: Michał Morzywołek: "Re: Relationships of unsaved object"

    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
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Jun 05 2008 - 10:12:03 EDT