1 Reply Latest reply on Aug 5, 2003 4:15 PM by Papick

    Transaction Rolled back while adding beans to CMR Field

    Papick Newbie

      Hi,

      I am a little bit confused about how to add beans in to a newly created entity bean.

      in my webapplication users can select some "positions" to add to a new "invoice". the positions already exist.

      i have a 1-n cmr relation between postion and invoice (yes, a position can only be related to one invoice).

      in my session facade i receive the in information needed to create a new "invoice" and a collection of positionValueObjects. my "invoice creation" process goes through 2 formulars, the positionVOs are stored into the tomcat session on the first step and passed to the session facade out of the session scope in the last step.

      so, in my session facade method (tx: required) i create my "invoce" bean, and then i myke a findbyprimarykey for each position pk to get the local interface of each "position". it works until here.

      the exception is thrown at the moment i make a "invoice.getPositions().add(positionBean);",

      the message is: "Entity not found: primaryKey=;"

      would appreciate any comments.


      brgds,

      papick


      ps: i am using a one week old cvs version of xdoclet, struts 1.1 and the jboss 3.2.1 / tomcat bundle...