0 Replies Latest reply on May 13, 2004 3:00 AM by Sebastiaan Kortleven

    Relationship Lazy Loading in jboss3.2.3 does not give expect

    Sebastiaan Kortleven Newbie


      I've got 2 tables: Price and Product, each product has some prices:
      Price table:
      * rowid
      * price
      * product
      * date
      Product table:

      Now I would like to fetch all prices and the corresponding products on a certain date.
      So I create an eager-load-group in my price entity tag to load all data instead of just the rowid.
      This works well,

      But then I also need the info that's stored in the product, so JBoss starts to run a query for each price I loaded. I looked at the documentation I bought and found the chapter on Relationships lazy loading, so I added these linese to my jbosscmp-jdbc.xml:

       <ejb-relation-name>ProductEJB - PriceEJB</ejb-relation-name>

      But performing these changes, changes nothing in the queries that JBoss is running.
      Any pointers?
      (is there a way to load all of the data of price and corresponding product in 1 query? something like JOIN in sql)