• 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
Re: Fetch spec "where not In"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fetch spec "where not In"


  • Subject: Re: Fetch spec "where not In"
  • From: Jevon Hills <email@hidden>
  • Date: Wed, 17 Sep 2003 14:51:01 -0600

Acutally We have this table of contacts and we are just beginning to produce tables like venue, but there will be others like operator, vendor, dealer, etc. these tables esentially only have their PrimaryKey and one or two pieces of data, rather than having a table which refers to its self over and over.

For example we can have a person as a contact named bob, and bob is assocated with the Venue "Drinx". So our contact table has 2 rows. One for bob as a person, One for Drinx. and Drinx will also have a row in venue. Obviously there is a relationship between Venue and contact in that a venue can get it's contact info, but I'm having a hard time creating the inverse.

So if I were to get my way here what I want is to query contacts and return only bob and not drinks.



As a question to (EOQualifier.qualifierWithQualifierFormat("venue = %@", new NSArray( NSKeyValueCoding.NullValue ) );) I understand what you have written, but I'm creating the fetch in EOModeler, so that I can use it with a DisplayGroup relatively easily. How would I accomplish what you have suggested using EOModeler?




On Wednesday, September 17, 2003, at 02:13 PM, Jonathan Rochkind wrote:

It depends on exactly how you have it modeled (and it can get tricky, depending), but the first thing to try is simply:

EOQualifier.qualifierWithQualifierFormat("venue = %@", new NSArray( NSKeyValueCoding.NullValue ) );

That is, where the "venue" relationship is null.

If that doesn't do it for you, tell us more about your model/schema. How is the relationship from Venue to Contact defined.

It sounds like the real "meaning" there is an inheritance one. Since you said Venue _is_ a Contact, but not all Contacts are Venues. You _could_ actually model this inheritance, so Venue would actually _be_ a Contact, instead of having a relationship to Contact. But it doesn't sound like you've done so, and you don't neccesarily need to, it's an added level of complexity in your model.

--Jonathan

At 01:40 PM 9/17/2003 -0600, Jevon Hills wrote:
I have two tables in a one to 0 or 1 relationship.  Contact and Venue.

Essentially a Venue is a contact, but a contact is not necessarily a venue
contact 1<-->0..1 Venue


I want to create a fetch which gets all contacts which are not venues.
 How can I do this?



Jevon K. Hills
Developer - Zymeta Media Promotion Systems
_______________________________________________
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.


Jevon K. Hills
Developer - Zymeta Media Promotion Systems
_______________________________________________
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: Fetch spec "where not In"
      • From: "Adam Chan" <email@hidden>
  • Prev by Date: Re: Fetch spec "where not In"
  • Next by Date: Re: Fetch spec "where not In"
  • Previous by thread: Re: Fetch spec "where not In"
  • Next by thread: Re: Fetch spec "where not In"
  • Index(es):
    • Date
    • Thread