Joined: Tue Apr 07, 2009 8:38 am Posts: 2 Location: London
|
Hi,
I have an entity with birthday and age properties.
The application manages the age one (the birthday is set only during persisting it the first time) that is set as @Transient (it's not on the db).
I use one method marked @PreUpdate to calculate the birthday giving the transient age field.
The problem is that is I only modify the age property the entity doesn't become dirty so the @PreUpdate method is not called.
If I modify some other property it works.
Is that the right way of doing those kind of things? How can I do to set the entity dirty from the age setter method?
Hope I was clear.
Thanks
Demetrio
|
|