users@glassfish.java.net

JPA flush or refresh an entity not calling setters

From: <glassfish_at_javadesktop.org>
Date: Sun, 11 Feb 2007 12:44:08 PST

Sorry if this is a newbie question. I'm using JPA in a SE environment. Say I have a managed entity in a persistence context. I do a flush or a refresh on the entity and one of the fields has changed on that entity. The entity is updated but the setter for that field is not called. So, if for example, I had wanted to add propertychangesupport or make it observable I cannot because I am not aware of the particular field changing. I believe I could do something with a lifecycle event but was wondering if anyone has any thoughts on the more accepted way of doing this.
Thanks in advance.
[Message sent by forum member 'jland' (jland)]

http://forums.java.net/jive/thread.jspa?messageID=203268