Hi there,

On 24/04/2007, at 12:44 AM, Kieran Kelleher wrote:

If you have control over the DB design, then don't waste your time fiddling with ints for booleans.

Why not? They work very well.

Use the database vendor independent boolean prototype that uses the strings 'true' and 'false' in the db and converts on the fly in and out of the DB to Boolean objects.

BOOL is not standard sql. Simply use SMALLINT which is standard sql... and set the valueType = 'c'. See the EOModeler User Guide > Working With Attributes > More About Attribute Characteristics > Value Type: http://developer.apple.com/referencelibrary/DeveloperTools/ idxWebObjects-date.html

Here's a usual example that works perfectly:
       {
           allowsNull = Y;
           columnName = isDeleted;
           externalType = SMALLINT;
           name = isDeleted;
           valueClassName = NSNumber;
           valueType = c;
       },

Why bother creating a varchar column for something simple? But certainly using prototypes is recommended...

with regards,
--

Lachlan Deck



_______________________________________________
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