Hi All,
I have the following relationship :
GROUP <-- --> RQF_GROUP
where a group may have a RQF Group object, but the RQF Group object must belong to a group.
As its a to one I want it to propagate its primary key across, however when I tick this box WO is nice and helpful and inserts a new RQFGroup object every-time I make a new Group, even thought I have specified that the relationship is optional. Is there any way to stop this from happening ?
I have tried to turn off the Propagates Primary Key section, however this then leads to the situation where if I DO want and RQFGroup to be created ( which I do by hand ) and then save both of the new objects to the DB I get the following error ...
EvaluateExpression failed: <com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: "SELECT RQF_GRP_SEQ.NEXTVAL FROM DUAL">: Next exception:SQL State:42000 -- error code: 2289 -- msg: ORA-02289: sequence does not exist
Which makes sense when you read the doc ...
"The Propagate Primary Key option lets you specify that the primary key of the source entity should be propagated to newly inserted objects in the destination of the relationship. That is, when inserting objects that are the destination of the relationship, this option suppresses primary key generation for the destination entity and instead uses the source object’s primary key as the primary key for the newly inserted destination object."
Owen McKerrow WebMaster, emlab Ph : +61 02 4221 5517
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"I like the way this project has somehow, against all common sense, got itself made." - Peter Jackson, "The Lord of The Rings" |