Adding primary & secondary simultaneously
Adding primary & secondary simultaneously
- Subject: Adding primary & secondary simultaneously
- From: Drew Thoeni <email@hidden>
- Date: Tue, 9 Dec 2003 23:04:16 -0500
- Resent-date: Wed, 10 Dec 2003 20:09:43 -0500
- Resent-from: Drew Thoeni <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
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.