Thanks Mike...
Well... I went inside EOJDBCOpenBasePrototypes.plist and I replaced the definition for the intBoolean by the one for FrontBase (which I know works), except that I changed the external type from INTEGER to int because that's what all other integer prototypes for OpenBase seem to use. And... NOW IT WORKS!!!
Ok... so here's the definition I ended up using which finally works with OpenBase:
{ columnName = ""; externalType = int; factoryMethodArgumentType = EOFactoryMethodArgumentIsNSString; name = intBoolean; valueClassName = NSNumber; valueType = c; },
By the way, this definition also works if I go into the OpenBaseManager and change the column type from integer to boolean.
Should this be checked in back into Wonder? Otherwise next time I upgrade to the latest Wonder I'll have to patch it again. :-)
Ricardo
On Mar 8, 2009, at 11:17 PM, Mike Schrag wrote: 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 ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H_______________________________________________ Wonder-disc mailing list email@hidden https://lists.sourceforge.net/lists/listinfo/wonder-disc
|