On 22-Mar-08, at 7:42 PM, Art Isbell wrote:

On Mar 22, 2008, at 12:59 PM, Gustavo Pizano wrote:
Hello. I have in my db some convocations with a state. (false, true) , I wanna fetch the one-ones which state its true. how to do this.

I was thinking in doing hte following

1 -EOQualifier qual = Convocation.STATE.eq(true), but thtat retunr me a boolean.

        // Assumes that "state" is a boolean implemented as an integer.
NSArray convocations = EOUtilities.objectsMatchingKeyAndValue(editingContext, "Convocation", "state", new Integer(1));

EOUtilities.objectsMatchingKeyAndValue() is a short cut for the following:

EOQualifier qual = new EOKeyValueQualifier("state", EOQualifier.QualifierOperatorEqual, new Integer(1)); EOFetchSpecification fetchSpec = new EOFetchSpecification("Convocation", qual, null); NSArray convocations = editingContext.objectsWithFetchSpecification(fetchSpec);

I think Gus mentioned that he is using the ERPrototypes boolean prototype which maps to a varchar.

And he is using the Wonder Veogen templates so he gets named ERXKeys for each of his attributes that he can use to easily build qualifiers.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to