Using OpenJPA 2.0.1, I have a date field in my entity. Setting the field to a
non-null value causes the data to be persisted as one would expect. Setting
the value to null, however, does not trigger an UPDATE operation. I'm still
digging, but I'm sure that someone else has encountered this.
Jerry -
Is the Entity which you are trying to update being serialized/deserialized?
Thanks,
Rick
On Fri, Feb 4, 2011 at 12:25 PM, Jerry Carter je...@jerrycarter.org wrote:
Using OpenJPA 2.0.1, I have a date field in my entity. Setting the field
to a non-null value causes the data to be
Yes, it is. The object is changed remotely and then merged. The data on the
wire is fine.
On Feb 4, 2011, at 1:47 PM, Rick Curtis [via OpenJPA] wrote:
Jerry -
Is the Entity which you are trying to update being serialized/deserialized?
Thanks,
Rick
On Fri, Feb 4, 2011 at 12:25
Jerry -
That would be the problem then. We lost track of the fact that you set this
field to null, and assume that it wasn't loaded. Please review the
openjpa.DetachState [1] docs for more info. You could set the property
listed below so that we will stream our DetachedStateManager around.
Rick:
First of all, thank you very much for the quick response and definitive answer.
Am I right is assuming that null values should be copies on merge? I've
reviewed the JPA 2.0 specification. I see that 3.2.7.1 does not disadvantage
null values
If X is a detached entity, the state of X
Jerry,
I had the same problem, and now use
property name=openjpa.DetachState
value=loaded(DetachedStateField=true)/
I use DetachStrategy 'loaded' instead of 'fetch-groups' because fetch-groups
gave me lots of problems.
Please be aware that the entities should be Serializable and there are
Hello,
I have some legacy code that deletes data in a JDBC transaction so I can't
use an EM to delete a case. After the delete I need to get the object out
of the L1 cache. So I do this:
OpenJPAEntityManager oem = (OpenJPAEntityManager)
ExecutionResources.getEntityManager();