0 Replies Latest reply on Apr 15, 2003 6:35 PM by Stephen Ridley

    Assistance with CMR and ejbSelect plse!

    Stephen Ridley Newbie

      I do not understand the mechanics of ejbSelect and entity loading correctly.

      I have set up a relation between two entities. If I create a related pair of entites, I am then able to select the others managed fields from an ejbSelect. I have got this working fine.

      However, if I do not create the relation but restart jboss and freshly obtain the created entity using findByPrimaryKey and then try to access the realted entities fields this fails with:

      java.rmi.NoSuchObjectException: EJB home methods are not allowed to access CMP or CMR fields: methodName=getId
      at org.jboss.ejb.plugine.AbstractInstanceCache.get(AbstractInstanceCache.java:122)
      etc. .

      I think I need to have the other half of the relation pre-loaded somehow ?

      Can someone who understands the semantics of this please explain to me what I am missing.