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.
ps: i am using a one week old cvs version of xdoclet, struts 1.1 and the jboss 3.2.1 / tomcat bundle...
ok, i got it. it works the way it should.
i had the following problem: my PKs are strings (GUIDS) and the default value for my FK was '' (empty string) and not null. so jboss was attempting to localize those beans when managing the relation...
sorry for this posting,