• 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
Modifying intermediate table in Many-To-Many relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modifying intermediate table in Many-To-Many relationship


  • Subject: Modifying intermediate table in Many-To-Many relationship
  • From: "John Huss" <email@hidden>
  • Date: Fri, 3 Feb 2006 12:10:15 -0600

I have a many-to-many relationship like this:

Account -> AccountStore -> Store

When I add a store to an account with addObjectToBothSidesOfRelationshipWithKey (via the magic of many-to-many relationships) the object representing the intermediate table does not get created in memory. It only is accessible after everything has been saved and refetched.

So when I examine it, account.accountStores() is empty.

I need to set a value in this intermediate table, preferably at the same time everything else is saved.

I can set up all the relationships manually to make sure everything is correct in memory, but then when I go to save, it tries to create TWO rows in the intermediate table causing a primary key violation.

Any ideas about the best way to do this?

John

_______________________________________________
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: Modifying intermediate table in Many-To-Many relationship
      • From: Mark Morris <email@hidden>
References: 
 >File download question (From: Amedeo Mantica <email@hidden>)
 >Re: File download question (From: Miguel Arroz <email@hidden>)
 >Re: File download question (From: Amedeo Mantica <email@hidden>)
 >Re: File download question (From: John Andersson <email@hidden>)
 >Re: File download question (From: Amedeo Mantica <email@hidden>)

  • Prev by Date: Re: WebObjects Licensing
  • Next by Date: Re: Modifying intermediate table in Many-To-Many relationship
  • Previous by thread: Re: File download question
  • Next by thread: Re: Modifying intermediate table in Many-To-Many relationship
  • Index(es):
    • Date
    • Thread