Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » [SOLVED] How to register pre/post refresh callbacks on an entity? (EntityManager refresh callbacks)
icon3.gif  [SOLVED] How to register pre/post refresh callbacks on an entity? [message #879618] Thu, 31 May 2012 10:27 Go to previous message
Christophe Bismuth is currently offline Christophe Bismuth
Messages: 67
Registered: July 2009
Location: Paris, France
Member

Hi,

Is there any way to register pre/post refresh callbacks on an entity?

I have some business logic to trigger in a setter only upon developer API call, not when the entity is refreshed.

It's all about a computed field which value can be overridden by an end-user input.
The problem is when refreshing the entity, the field is computed again and erase the value overridden by the user input retrieved from the database. And then, the entity is getting dirty just after being refreshed.

Thanks,
Chris

[Updated on: Fri, 01 June 2012 05:00]

Report message to a moderator

 
Read Message icon3.gif
Read Message
Read Message
Previous Topic:JPA Error when new entity is added without DropAndCreate
Next Topic:Generate schema from MOXY external bindings-oxm.xml file...
Goto Forum:
  


Current Time: Mon May 20 17:59:17 EDT 2013

Powered by FUDForum. Page generated in 0.03332 seconds