Re: [Hibernate] Flush behavior
On Nov 21, 2005, at 2:03 AM, Gavin King wrote: Huh? http://opensource.atlassian.com/projects/hibernate/browse/HHH-1181 s.persist(o) is only transitive to anything reachable at call time. em.persist(o) is transitive at flush time. --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Flush behavior
You are quite wrong. The persist() is applied and cascades at flush time. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Bauer Sent: Monday, November 21, 2005 1:46 AM To: Hibernate development Subject: Re: [Hibernate] Flush behavior On Nov 21, 2005, at 2:03 AM, Gavin King wrote: Huh? http://opensource.atlassian.com/projects/hibernate/browse/HHH-1181 s.persist(o) is only transitive to anything reachable at call time. em.persist(o) is transitive at flush time. --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28alloc_id845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Flush behavior
Oh, you mean in plain Hibernate, not in HEM. This is again correct. You must enable cascade save-update, as in all versions of Hibernate. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gavin King Sent: Monday, November 21, 2005 5:07 AM To: Christian Bauer; Hibernate development Subject: RE: [Hibernate] Flush behavior You are quite wrong. The persist() is applied and cascades at flush time. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Bauer Sent: Monday, November 21, 2005 1:46 AM To: Hibernate development Subject: Re: [Hibernate] Flush behavior On Nov 21, 2005, at 2:03 AM, Gavin King wrote: Huh? http://opensource.atlassian.com/projects/hibernate/browse/HHH-1181 s.persist(o) is only transitive to anything reachable at call time. em.persist(o) is transitive at flush time. --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28alloc_id845op=ick ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28alloc_id845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Flush behavior
On Nov 21, 2005, at 2:14 PM, Gavin King wrote: Oh, you mean in plain Hibernate, not in HEM. This is again correct. You must enable cascade save-update, as in all versions of Hibernate. Why? --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Flush behavior
On Nov 21, 2005, at 2:46 PM, Christian Bauer wrote: Why? Ok, so I'm trying to come up with a paragraph that explains this for the documentation: Note that if you use cascade=persist, Hibernate will only cascade the persistent state to associated entities reachable at call time. If more transient entities are associated with already persistent instances, they will not become persistent, unless you also use the save-update option, cascade=persist, save-update. Hibernate then cascades the persistent state at flush time to all reachable entity instances, if save-update is enabled for an association. Correct? --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Flush behavior
This is again correct. You must enable cascade save-update, as in all versions of Hibernate. Why? Because no other behavior would be well-defined. --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28alloc_id845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Flush behavior
I don't understand what is so difficult to understand here. Persist() is no different to delete(), merge() or evict() in this respect. You have to explain things in terms of what operation is applied at flush time. In the case of Hibernate it is the save/update operation. In the case of EJB3 it is the persist operation. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Bauer Sent: Monday, November 21, 2005 6:18 AM To: Hibernate development Subject: Re: [Hibernate] Flush behavior On Nov 21, 2005, at 2:46 PM, Christian Bauer wrote: Why? Ok, so I'm trying to come up with a paragraph that explains this for the documentation: Note that if you use cascade=persist, Hibernate will only cascade the persistent state to associated entities reachable at call time. If more transient entities are associated with already persistent instances, they will not become persistent, unless you also use the save-update option, cascade=persist, save-update. Hibernate then cascades the persistent state at flush time to all reachable entity instances, if save-update is enabled for an association. Correct? --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28alloc_id845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Flush behavior
Negative. Hibernate cascades the saveOrUpdate() operation, EJB3 cascades the persist() operation. They should and are quite different. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Bauer Sent: Sunday, November 20, 2005 3:43 AM To: Hibernate development Subject: [Hibernate] Flush behavior http://opensource.atlassian.com/projects/hibernate/browse/HHH-1181 They should be synchronized, if we have the same methods on Session and on EM, they should do the same. --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28alloc_id845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Flush behavior
On Nov 20, 2005, at 6:48 PM, Gavin King wrote: Hibernate cascades the saveOrUpdate() operation, EJB3 cascades the persist() operation. They should and are quite different. But why are persist (and possibly merge) only cascaded at call time and not at flush time, if I use the Session API? I think no other operation has that behavior and if I read the spec correctly, it also doesn't happen in EJB3. --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] Flush behavior
Huh? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Bauer Sent: Sunday, November 20, 2005 12:58 PM To: Hibernate development Subject: Re: [Hibernate] Flush behavior On Nov 20, 2005, at 6:48 PM, Gavin King wrote: Hibernate cascades the saveOrUpdate() operation, EJB3 cascades the persist() operation. They should and are quite different. But why are persist (and possibly merge) only cascaded at call time and not at flush time, if I use the Session API? I think no other operation has that behavior and if I read the spec correctly, it also doesn't happen in EJB3. --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28alloc_id845op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel