• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Non Compulsory toOne Relationships, Propergating Primary Key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Non Compulsory toOne Relationships, Propergating Primary Key


  • Subject: Non Compulsory toOne Relationships, Propergating Primary Key
  • From: Owen McKerrow <email@hidden>
  • Date: Fri, 7 Dec 2007 17:18:56 +1100

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
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

"I like the way this project has somehow, against all common sense, got itself made."
    - Peter Jackson,  "The Lord of The Rings"


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Non Compulsory toOne Relationships, Propergating Primary Key
      • From: Art Isbell <email@hidden>
  • Prev by Date: Re: WOLips/Ant: Installing {$project.name} in //Library/Frameworks
  • Next by Date: Re: Non Compulsory toOne Relationships, Propergating Primary Key
  • Previous by thread: WOLips Versions?
  • Next by thread: Re: Non Compulsory toOne Relationships, Propergating Primary Key
  • Index(es):
    • Date
    • Thread