2 Replies Latest reply on Jul 20, 2004 11:32 AM by James

    CMP Query and Load Optimization

    James Newbie

      Hi,

      I am trying to optimize the CMP queries and load groups for my application. It all seems to be working fine except for the following areas:

      1) I can't get the CMP engine to use a load group with on-find for loading relationships or findbyprimarykey? How do I specify these? This question may be more for the CMP group but though I would try here first.

      2) When you specify a relationship accessor in a load group, jboss still does two queries to fetch the data although it seems to preload it. Is there a way to force the container to load the primary bean and the related bean in one query? This would be a lot more efficient in terms of database usage.

      Thanks.
      James