• 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
Many to Many with an ordered join table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Many to Many with an ordered join table


  • Subject: Many to Many with an ordered join table
  • From: Charles Young <email@hidden>
  • Date: Thu, 7 May 2009 17:20:35 -0700

Hi

I'm sure I have a commonly seen issue:

I have a many to many relationship between tables SOURCE and DEST. This is implemented by a third table GLUE which contains the PKs of SOURCE and DEST as well as an integer property (order) that describes the order of DESTs with respect to SOURCE.

I'd like to flatten the relationship such that I can call a method like:

source.dests() -> NSArray <Dest>

where the array is ordered by source.glue.order().

I've written a simple method that grabs source.glue(), sorts it on glue.order() and then iterates to extract dest, but I'm sure this issue has been solved many, many times before in a cleaner and more elegant manner.

On a separate subject thanks to all for a very interesting and informative group. I've been lurking for some time and have been enjoying the various conversations.

Cheers,
Charles

_______________________________________________
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


  • Follow-Ups:
    • Re: Many to Many with an ordered join table
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: can't create WOComponent
  • Next by Date: Re: No snapshot for gid _EOIntegralKeyGlobalID
  • Previous by thread: Re: Virtual host deployment question
  • Next by thread: Re: Many to Many with an ordered join table
  • Index(es):
    • Date
    • Thread