Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » cascade insert not working on Eclipselink event
cascade insert not working on Eclipselink event [message #528048] Mon, 19 April 2010 06:07 Go to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 807
Registered: July 2009
Senior Member
If we create and persist an entity in the preInsert Eclipselink event, these are simply not persisted. A PK is assigned, but the insert is not executed. What is the correct place to create and persist a related entity?

Tom
Re: cascade insert not working on Eclipselink event [message #528151 is a reply to message #528048] Mon, 19 April 2010 14:25 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

preInsert may be too late, you could try prePersist.

On the preInsert you could also manually insert the new object. Call Session.insertObject(), this may work.


James : Wiki : Book : Blog : Twitter
Previous Topic:Problem with ReportQuery
Next Topic:cascade delete not working when cache is active
Goto Forum:
  


Current Time: Sun Nov 23 08:50:47 GMT 2014

Powered by FUDForum. Page generated in 0.10173 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software