• 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
Adding primary & secondary simultaneously
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding primary & secondary simultaneously


  • Subject: Adding primary & secondary simultaneously
  • From: Drew Thoeni <email@hidden>
  • Date: Tue, 9 Dec 2003 23:04:16 -0500

I'm trying to add a new record to my client table and, from the same form and in the same transaction, add the client's address to a separate address table. The address table is a to-many relationship from the client table.

Modeling my code after the example in the WO "Web Applications" tutorial (below)

TUTORIAL
author.addToBooks(newBook);
newBook.setAuthor(author);

MY CODE
newClient.addToAddress(newAddress);
newAddress.setClientId(newClient);

I get an error "Register1.java:44: setClientId(java.lang.Number) in Address cannot be applied to (Client)"

I have also tried: newClient.addObjectToBothSidesOfRelationshipWithKey("Address"); With similar results.


Can anyone suggest a better example/documentation to work from (other than the Web Applications tutorial)? I am assuming it is possible to add both sides of a one-to-many relationship from one form (in a single trip to the server).


Regards,

Drew
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Adding primary & secondary simultaneously
      • From: Chuck Hill <email@hidden>
References: 
 >4th Dimension use with EOModeler? (From: Christian Telepski <email@hidden>)

  • Prev by Date: Re: How to create a stand-alone clone? [OT]
  • Next by Date: Re: Adding primary & secondary simultaneously
  • Previous by thread: 4th Dimension use with EOModeler?
  • Next by thread: Re: Adding primary & secondary simultaneously
  • Index(es):
    • Date
    • Thread