You must either set that, or set the 'persistence-unit-defaults' setting appropriately in orm.xml to turn on cascade-persist by default.
In 100% of the use cases that I've seen, you want cascade-persist on by default. So generally-speaking, you should always have an orm.xml file that has that entry in it. -Patrick On 9/4/07, Marina Vatkina <[EMAIL PROTECTED]> wrote: > Don't you also need to mark relationships as cascade=PERSIST or cascade=ALL? > Or > will OpenJPA persist related objects irrelevantly of the setting? > > thanks, > -marina > > Gene Wu wrote: > > The only think you will do is, entityManager.persist(master object). > > The master object has the relationship with multiple related > > tables(object). OpenJPA will take care of the rest tasks. > > > > > > Gene > > > > > > > > > >>Date: Sat, 1 Sep 2007 23:22:43 -0700> From: [EMAIL PROTECTED]> Subject: > >>Persisting multiple tables at once> To: [email protected]> > Hi,> > >>How do I use the Entity Manager to persist multiple related tables at once > >>in a web application to maintain referential integrity?> Thanks> > > > >>Ransford Segu-Baffoe> > [EMAIL PROTECTED]> > > >>https://serenade.dev.java.net/> http://www.noqturnalmediasystems.com/> > > >>---------------------------------> Got a little couch potato? > Check out > >>fun summer activities for kids. > > > > _________________________________________________________________ > > Connect to the next generation of MSN Messenger > > http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline > > > > -- Patrick Linskey 202 669 5907
