0 Replies Latest reply on Feb 6, 2003 8:00 AM by frederic

    both CMR bean and its foreign key in a CMP

    frederic Newbie

      How can I do to create a CMP containing both a CMR bean and the foreign key of the CMR?
      I can create a CMP containing the CMR bean, or the foreign key but NOT BOTH! : "CMP field for key not found: field name=<the foreign key>"
      (My goal is to set the foreign key (which cannot be null in database) in the ejbCreate et set the CMR bean in ejbPostCreate.)
      example : I would like to create this:
      a CMP Car containing both an Engine and an engineId and then declaring
      ejbCreate(String carId, Engine engine)=> setEngineId(engine.getId())
      ejbPostCreate(String carId, Engine engine)=>setEngine(engine).