5 Replies Latest reply on Aug 21, 2003 2:54 AM by Kayvan Mojarrad

    JBoss 3.2.1 - How do I create an eager-load group with only

    Kayvan Mojarrad Newbie

      Hi,

      Ok I know it's a bit of a strange question as the primary key is always eager-loaded.

      JBoss documentation states that when a query that selected the entity has defined an eager-load group, the eager-load fields are loaded as soon as a method is called on the entity. If there are any lazy-load groups, those fields will be loaded when a getter method of one of the group members is called.

      But what if the only field I require is the primary key. I would like to know if there's a way to configure an entity in such a way that if I only call the getter method of the primary key, no other fields are loaded.

      As it stands if I call the primary key getter without an eager-load definition, I see all the field of the row being loaded and if I try to create an eager-load group with just the primary key then I get a deployment exception.
      I think as JBoss does not allow the inclusion of the primary key field in the load-groups it should exclude the call to the primary key getter as a signal to load all the fields.

      kv.