users@glassfish.java.net

Re: JPA flush or refresh an entity not calling setters

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 12 Feb 2007 15:04:49 -0800

Hi,

Can you be a bit more specific? Do you use field or property based persistence?
If it's the former, the provider doesn't know about your set methods. If it's
the latter, you should've already called your setters to update an entity,
right? Or do you mean something else?

thanks,
-marina

glassfish_at_javadesktop.org wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>