> I'm wondering what the intent behind the eager-load and 
> lazy-load-group is.
> 
> I would think that you would want to partition the cmp-fields into one
> eager-load and 0 or more lazy-load groups.  Is this correct?
> 
> If so, the current xml structure makes it pretty easy to 
> include fields
> into many of these groups.  Is this intentional? What should 
> happen in this
> case?

This is intentional.  

An example is easier to explain. Let's say we have a product ejb with the
following lazy load groups:

<lazy-load-groups>
   <lazy-load-group>
      <description>pricing info</description>
      <field-name>unit</field-name>
      <field-name>costPerUnit</field-name>
      <field-name>weight</field-name>
   </lazy-load-group>
   <lazy-load-group>
      <description>shipping info</description>
      <field-name>length</field-name>
      <field-name>girth</field-name>
      <field-name>weight</field-name>
   </lazy-load-group>
</lazy-load-groups>
      
If you access unit or costPerUnit, and it is unloaded, you get unit,
costPerUnit and weight.  If you first access Wight you, all of the above
fields will be loaded. This allows you to have different groups with the
same data.  In the future I want each query to be able to have a different
eager load group.

I have been thinking that maybe, better to specify all groups. Then entity
would have a eager-load with just a group named and the lazy-load-groups
would have many names.  The real reason for the change would be to add an
eager-load element to the query element.

Oh, eager/lazy loading of relationship foreign key fields is on my todo
list. 


I have not decided how to structure this yet. What do you think?

-dain

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to