openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RamAESIS <rsan...@hcl.in>
Subject OneToMany lazy loading
Date Thu, 05 Mar 2009 09:23:25 GMT

Hi,

I am trying to lazy load a child collection in a one-to-many relationship as
shown below:

      @OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
      @ElementJoinColumns({
           @ElementJoinColumn(name="ColA",referencedColumnName="ColX"),
           @ElementJoinColumn(name="ColB",referencedColumnName="ColY"),
           @ElementJoinColumn(name="ColC",referencedColumnName="ColZ")

      })
      public Collection<TableB> TableB_Obj = new HashSet<TableB>();

But after accessing the child collection  also it is still NULL, EAGER mode
works properly. Any guess or guidance in this issue is highly appreciated.
Thanks in advance.

Regards,
Ram

-- 
View this message in context: http://n2.nabble.com/OneToMany-lazy-loading-tp2428285p2428285.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message