Right on. I'm thinking a basic field such as a date would always be
considered loaded. The documentation is a little ambiguous around this
point and I'm not quite ready to dig into the OpenJPA source code just
yet.

I think posting a bug with a simplified test case is my next step, I
just wanted to make sure I wasn't completely mis-reading the
documentation before moving an issue report forward.

-jmh

On Fri, Aug 21, 2009 at 10:31 AM, Daryl Stultz<da...@6degrees.com> wrote:
> On Fri, Aug 21, 2009 at 10:18 AM, Jason Hanna <
> jason.m.hanna.at.coincid...@gmail.com> wrote:
>
>> fields that would have been included in the
>> detached state are treated as loaded, and will in turn set the
>> corresponding attached field to null.
>>
>
> I would say, if you think it's a bug, create a test case with an entity that
> defines a field that "would have been included in the detached state".
> Persist an instance, detach it, set the field to null, merge it, verify the
> null value in the database. The question for me is, what qualifies as a
> field that  "would have been included in the detached state". I would think
> a Date would always be loaded. Of course, there is the scenario in which the
> entity is instantiated from a native query that doesn't select the Date
> field. Then it is truly unloaded and should not update the DB with null.
>
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:da...@6degrees.com
>

Reply via email to