EOOrQualifier generated from an array
EOOrQualifier generated from an array
- Subject: EOOrQualifier generated from an array
- From: Clark Mueller <email@hidden>
- Date: Mon, 25 Dec 2006 00:25:32 -0700
Hello all,
I have a question about fetch specs, and use of arrays as an argument
(or not). To me, it seems like intuitive behavior that passing an
array as an argument to a fetch spec should generate an "or"
qualifier string based on the elements of that array.
Suppose, for example, that I have an entity Inventory and Location. I
have a fetch specification for Inventory that looks like "serialNo =
$serialNo and location = $location". I would like to be able to pass
an array of Locations to this fetch specification, such that a query
is created looking like:
select ... from inventory where serialNo = $serialNo and
(location=location1 or location=location2 or location=location3)
I'm pretty sure I've seen mention of this behavior before, but I
don't quite see how to implement it. Is that something I can use
joins for, or is there another way to do it other than manually
building the qualifier?
Thanks,
Clark
_______________________________________________
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