Re: Simple Many-to-Many Question
Re: Simple Many-to-Many Question
- Subject: Re: Simple Many-to-Many Question
- From: David Schneider-Joseph <email@hidden>
- Date: Fri, 26 Aug 2005 20:30:36 -0400
Well, I figured it out. Turns out I was doing everything right in
creating the EOModel, except that somehow the "interests" and
"people" fields were not class properties, so EOGenerator wasn't
generating code for them. I created this EOModel weeks ago, so I
have no idea whether they were generated that way, or I accidentally
modified them.
Your run-through helped me to look in the right place. Thank you.
On Aug 26, 2005, at 8:02 PM, Chuck Hill wrote:
You should not have to write anything. You need to have two
relationships in the model. One, Person ->> PersonInterests you
probably already have. Make it not a class property. Then expand
the relationship in the left hand pane down to the Interests
entity. Then click the Flatten Relationship icon (top, right).
Also see "Flattening Relationships" in the docs. Done like this,
eogenerator and EOF will take care of the details for you.
This should also be described in Apple's tutorials.
Chuck
On Aug 26, 2005, at 4:55 PM, David Schneider-Joseph wrote:
I have two entity tables, Person and Interest. I also have a many-
to-many relationship between People and Interests, in a table
named PeopleInterests. I am generating Java source with
EOGenerator. How do I write a method for Person which returns an
NSArray of all the Interests that person has? EOGenerator doesn't
seem to generate the method itself, and nothing I can think of works.
Thanks,
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects
developers who want to increase their overall knowledge of
WebObjects, or those who are trying to solve specific application
development problems.
http://www.global-village.net/products/practical_webobjects
David Schneider-Joseph
http://www.davidsj.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