Re: [Wonder-disc] OpenBase / boolean / ERPrototypes
Re: [Wonder-disc] OpenBase / boolean / ERPrototypes
- Subject: Re: [Wonder-disc] OpenBase / boolean / ERPrototypes
- From: Mike Schrag <email@hidden>
- Date: Sun, 8 Mar 2009 23:17:19 -0400
Not sure I understood what you mean by flag. :-)
there is a prototype named "flag" that maps onto whatever your database considers a "bit" type -- if your database natively supports a boolean type, this is the one you would use, though there are good odds the definition is wrong for OB Anyways, here's the boolean protototype from ERPrototypes as defined in EOJDBCOpenBasePrototypes.plist:
yes, this is the varchar(5) boolean type that turns into the strings "true" or "false" in the database.
and the intBoolean prototype is setup as follows:
{ adaptorValueConversionMethodName = toString; columnName = ""; externalType = bool; factoryMethodArgumentType = EOFactoryMethodArgumentIsNSString; name = intBoolean; valueClassName = NSNumber; valueFactoryMethodName = valueOf; valueType = c; },
You're setting this up wrong .. you should look at the other databases versions of this in ERP ... you don't have/need a valueFactoryMethodName and a conversion method name for integer types .. it's much easier than that.
I've been trying all kinds of things to get these booleans to work... And I just thought of one which might work. I'll change the type in openbase for those columns back to integer type. Then I'll use the intBoolean prototype from ERPrototypes. I assume that's what the intBoolean prototype is for: to have a boolean in your EO stored as an integer in the database. Right?
yes, though again, if you're using the "boolean" type, you're probably not going to want intBoolean (though it may work "by accident").
ms |
_______________________________________________
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