fcalfo wrote:
Doesn't the persistence context have to be open for a lazy loaded
collection to be fetched?
I am making sure to run the static weaver
(org.eclipse.persistence.tools.weaving.jpa.StaticWeave) before running my
test.
More info on this: while inspecting the Contract.class file after the static
weaver was applied, it looks like
it didn't weave in the lazy loading.
Here's the class definition from the class file after StaticWeave was run:
public class jpa.Contract implements java.lang.Cloneable,
org.eclipse.persistence.internal.weaving.PersistenceWeaved,
org.eclipse.persistence.internal.descriptors.PersistenceEntity,
org.eclipse.persistence.internal.descriptors.PersistenceObject {
It did something since it added the PersistenceWeaved interface
but it should have also added the PersistenceWeavedLazy interface.
Why didn't it add that even though I added the lazy fetch type on the
supplierContracts collection and the eclipselink.weaving.lazy property is
set to true?
(I do have this working on another class so I'm wondering what I'm missing
here)