Re: Join tables in MySQL

"jbs_mailuk" <[email protected]>
Newsgroups gmane.comp.web.webobjects.newbies
Message-ID <[email protected]>

--- In [email protected], David LeBer <dleber@c...> 
> 
> It is inadvisable to flatten the relationship in your model if you need 
> to expose the intermediate relationships. This will give EOF two paths 
> to the same data and will result in "bad things". For one it will 
> definitely screw up your RI rules (I know I speak from experience).
> 


Yep, I see your point.  Not an issue at low level, but neither is
there a benefit of WO abstraction.


> > If I have a TermCon which has two relationships (equiv to FK) to
> > Entity1 & Entity2, I want to be able to generate a list (e.g. NSArray)
> > of related Entity2s to Entity1, something like Entity1.entity2s().
> 
> You can still do this:
> 
> In Entity1 create a convenience method:
> 	
> 	public NSArray entity2s() {
> 		return (NSArray)this.valueForKeyPath("termCons.entity2");
> 	}
> 
> Key Value Coding will give you the array you want.


That's exactly what I want!

It's for behind-the-scenes code so I don't need to hook to
WOrepetitions, but I'll certainly note that for the future.

Again, many thanks.
John






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/webobjects-newbies/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.