Ok txs. This means Hibernate must load all properties of an entity in a very eager way.
Even ElementCollections and blobs, right?
Otherwise you cannot distinguish between
*) field is null because the blob didn't get loaded yet (_loaded==false)
*) field is null because it got set to null to clear it (_loaded==true, _dirty==true)
The _dirty is not that important (only can help to improve performance), but it would be
fine if the JPA spec could introduce a
@Loaded
private BitField _loaded;
like we have with @Version.
wdyt?
LieGrue,
strub
PS: sorry if this is now a bit OT already ...
--- On Mon, 7/11/11, Emmanuel Bernard <emmanuel(a)hibernate.org> wrote:
From: Emmanuel Bernard <emmanuel(a)hibernate.org>
Subject: Re: [seam-dev] [seam-persistence] ManagedPersistenceContextExtension
To: "Mark Struberg" <struberg(a)yahoo.de>
Cc: "John D. Ament" <john.d.ament(a)gmail.com>,
"seam-dev(a)lists.jboss.org" <seam-dev(a)lists.jboss.org>
Date: Monday, July 11, 2011, 8:19 AM
On 11 juil. 2011, at 09:53, Mark Struberg wrote:
> I'm not sure about Hibernate, but OpenJPA and
Eclipselink both store _loaded and _dirty bitfields in
detached entities and this info will also get serialized
along the line.
We don't as we don't mandate bytecode enhancement.