| How to obtain the entity ID after persit from a trigger generated value [message #1017084]
||Fri, 08 March 2013 16:51
| Scott Selvia
Registered: April 2010
We are using eclipselink via Glassfish 3+, our oracle table has a trigger that generates a PK VARCHAR value from a trigger. The value is generated from the CCYYMMDD of the current date and a sequence value. We can persist the entity without issues but we cannot figure out how to obtain the entity @ID value once the object has been persisted. We set the id value to null when the object is initialized, the id value is then generated by the trigger. We've tried to get the id after the persist with a flush and/or refresh but it's not working.|
The trigger and the ID value is controlled by the DBA's and the requirements for the application.
Any solutions to the problem...Thanks.
[Updated on: Fri, 08 March 2013 17:05]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01634 seconds