I have 3 entity
A -> B <-> C
All assoc is OneToMany (from left to right),
the arrow indicate uni-dir or bidi.
For the B and C association, C is the owning side.
When persist a entity (a tree with around 4 level) and then
merged again.
The returned entity (Java instance) is the exact copy I used to persist.
When this seems reasonable.
However, when I access properties
List<C> something = a.getB().getC();
it is null.
But I expect I can get a enchaned version of B,
so getC will trigger lazy-loading.
Is my understanding wrong, or I have missed anything?
|