• 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
Re: adding multiple objects in a relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding multiple objects in a relationship


  • Subject: Re: adding multiple objects in a relationship
  • From: Lachlan Deck <email@hidden>
  • Date: Sat, 18 Oct 2008 14:41:10 +1100

On 18/10/2008, at 12:00 PM, WebObjects wrote:

Hello, well after so much struggle, finally I have my app up and running, but there is a problem.

for the people who knows what's my app all about, you will know that an Employee can have multiple Turn, now, Im doing the following:
NSArray<Turn> localSelectedItems = EOUtilities.localInstancesOfObjects(myEC, selectedItems());
EmployeeTurn empxTurn = (EmployeeTurn) ERXEOControlUtilities.createAndInsertObject(myEC,"EmployeeTurn");


empxTurn.addObjectToBothSidesOfRelationshipWithKey(localEmployee, EmployeeTurn.EMPLOYEE_KEY);


empxTurn .addObjectsToBothSidesOfRelationshipWithKey(localSelectedItems, EmployeeTurn.TURN_KEY);

Unless you've named this weirdly, TURN_KEY doesn't appear to be a toMany key. i.e., it's not a plural. Check your model that there is indeed a toMany relationship (and if accross a join that there's a reverse toMany).


with regards,
--

Lachlan Deck



_______________________________________________
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: 
 >adding multiple objects in a relationship (From: WebObjects <email@hidden>)

  • Prev by Date: Re: do you want to blow your mind?
  • Next by Date: Re: adding multiple objects in a relationship
  • Previous by thread: adding multiple objects in a relationship
  • Next by thread: Re: adding multiple objects in a relationship
  • Index(es):
    • Date
    • Thread