• 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
[RESOLVED]: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RESOLVED]: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right?


  • Subject: [RESOLVED]: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right?
  • From: Baiss Eric Magnusson <email@hidden>
  • Date: Wed, 16 Mar 2005 18:42:38 -0800

These are my conclusions after a lot of re-adjustment of the code, I may be stating them in a less than perfect manner. The application is working.

I had one special condition that perhaps complicated the issue, when the Task fired I deleted it from the DB, but I am in the Application at the time and so have to use a temporary EditingContext, which I create and then dispose.

1) By changing to <EOUtilties.createAndInsertInstance(ec, "Event")> it simplified the code.

2) If you do not wish a related EO to always exist and you have a one-to-one relationship, then you need to have a primary key and a foreign key for both entities, this seems to be the big issue. Do not try to use Propagate Primary Key in this case.

3) I used <removeObjectFromBothSidesOfRelationshipWithKey> along with <addObjectToBothSidesOfRelationshipWithKey>, the former I found to be necessary when deleting the Task in the Application.


---- Baiss Eric Magnusson <http://www.Track-Your-Finances.com> <http://www.CascadeWebDesign.com>

_______________________________________________
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


References: 
 >Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right? (From: Baiss Eric Magnusson <email@hidden>)
 >Re: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right? (From: Arturo PĂ©rez <email@hidden>)
 >Re: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right? (From: Baiss Eric Magnusson <email@hidden>)
 >Re: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right? (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Double value problem in D2W app
  • Next by Date: Re: Package stratagies (are there some?)
  • Previous by thread: Re: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right?
  • Next by thread: Basic WO question
  • Index(es):
    • Date
    • Thread