<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Then add @*to*(cascade=CascadeType.PERSIST), it will take you 2 mins to do what you really like and you will know you do it.<div><br><div>Or even faster, add the stupid</div><div><entity-mappings></div><div> <persistence-unit-metadata></div><div> <persistence-unit-defaults></div><div> <cascade-persist/></div><div> </persistence-unit-defaults> </div><div> </persistence-unit-metadata></div><div></entity-mappings></div><div>in your orm.xml file and you are good to go.</div><div><br></div><div>I really like smoking Chicha when drinking tea. Not sure it should be enforced to everyone. Not sure if I should do it every time either.</div><div><div><div><br><div><div>On Mar 4, 2009, at 12:54, Dan Allen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Tue, Mar 3, 2009 at 8:10 AM, Emmanuel Bernard <span dir="ltr"><<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="im"><br> On Feb 28, 2009, at 08:08, Max Rydahl Andersen wrote:<br> <br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br> 2) What default do you think we should use for reveng, ALL or NONE (or something else ?)<br> </blockquote> <br></div> none</blockquote><div><br>What about PERSIST? I really like to be able to do this.<br><br>Child c1 = new Child();<br>Child c2 = new Child();<br>Parent p = new Parent();<br>p.addChild(c1);<br>p.addChild(c2);<br>em.persist(p);<br> <br>With none, you have to go through and do persists all over the place...and in a real application, that top level object typically has 10+ relationships, esp if lookup tables are used.<br><br>-Dan<br> </div></div><br>-- <br> Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br> <br>NOTE: While I make a strong effort to keep up with my email on a daily<br>basis, personal or other work matters can sometimes keep me away<br>from my email. If you contact me, but don't hear back for more than a week,<br> it is very likely that I am excessively backlogged or the message was<br>caught in the spam filters. Please don't hesitate to resend a message if<br>you feel that it did not reach my attention.<br></blockquote></div><br></div></div></div></div></body></html>