I wrote:

>  I can't get my @OneToMany references with FetchType.LAZY to become
>  populated by openjpa in geronimo. Using FetchType.EAGER works as
>  expected. Using OpenJPA standalone (in unit tests) and
>  transaction-type=LOCAL works too. But when I deploy the code in
>  geronimo my LAZY-fetched OneToMany relations are not populated.

False alarm. After poking around a bit more I noticed that the calling
code wasn't in a transaction. The customer entity was detached from the
entity manager long before the lazy-loaded resource had been populated.

BTW, while pondering I found a excellent introduction to JPA transactions:

 http://openejb.apache.org/3.0/jpa-concepts.html

Sorry for the noise.

-- 
Fredrik Jonson

Reply via email to