openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <>
Subject Re: null values not updating
Date Wed, 08 Jul 2009 17:00:41 GMT
On Wed, Jul 8, 2009 at 12:51 PM, Kevin Sutter <> wrote:

> Detecting null fields during re-attachment is tricky.  How do you know if
> the field was null'd out explicitly, or if it was never filled in in the
> first place?

That reminds me, I set this:
<property name="openjpa.DetachState" value="loaded(AccessUnloaded=false)"/>

so I don't get null when accessing an unloaded field (it throws exception).

Also, while I don't believe this is related to Chris's situation (since he
stated setting the field to some other non-null value works) I spent an
awful lot of time trying to figure out why a changed property was not being
updated in the DB: if you set a property while an entity is attached to an
em, then you detach from the em, reattach to another em, the merged changes
will not be saved. Detach from first em before setting properties.

Daryl Stultz
6 Degrees Software and Consulting, Inc.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message