Re: Fetch spec "where not In"[MORE]
Re: Fetch spec "where not In"[MORE]
- Subject: Re: Fetch spec "where not In"[MORE]
- From: Jevon Hills <email@hidden>
- Date: Fri, 19 Sep 2003 08:51:47 -0600
Behavior which I don't understand.
I used your qualifier suggestion from below, which more or less worked
as you had written it I changed as follows:
EOQualifier.qualifierWithQualifierFormat("venue.bussinessassociateid =
%@", new NSArray(NSKeyValueCoding.NullValue ) );
Apparently the venue for items does not register as null, although I'm
not certain why. This works. I get the "contacts" only with out
venues. The only issue I have now is that using a WOBatchNavigator it
displays "61 contacts" in it's title bar for an unfiltered search,
when there are only 22. Now I know that the table on which my
DispalyGroup is based has 61 items, but many of them are "venues".
I tried taking this knowledge and created in a Fetch spec in
EOModeler. When I created the qualifier (venue.bussinessassociateid
<>nil) It displayed for me all of my Venues so when I switched
(venue.bussinessassociateid = nil) I get no return values at all.
I looked in the .woo file to see how the diplay group is initiallized,
and see that by default its grabbing all of the entities.
Is there a way to add the quaifer to the .woo file to have it filter at
the time of creation, Normally I do this using a Fetch created in
EOModeler, but as you see I've hand no luck so far.
On Wednesday, September 17, 2003, at 04:43 PM, Jonathan Rochkind wrote:
EOQualifiers and EOF are not very good at subqueries, which is what
you've got there. There are complicated ways to get EOF to do a
subquery, which you can do if you really need to, but it really
doesn't seem like you need to here. And you couldn't do them from in
EOModeler, you could only do them programatically from inside your > app.
But it doesn't seem like you really need a subquery. There is other
SQL that will give you what you want, it seems like. Previous list
posts have contained several suggestions for ways to construct an
EOQualifier that will generate that SQL.
--Jonathan
At 04:11 PM 9/17/2003 -0600, Jevon Hills wrote:
WHEN I RUN the following query in my sql tool: Select * from
BusinessAssociate WHERE businessAssociateID NOT IN (Select
businessAssociateID from Venue) I get precisely what I want. How do I
get this in 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.
> _______________________________________________
> 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.
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.