Skip to main content


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: 817
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: Thu Mar 28 20:40:24 GMT 2024

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

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

Back to the top