Re: EOModeler and boolean
Re: EOModeler and boolean
- Subject: Re: EOModeler and boolean
- From: Lachlan Deck <email@hidden>
- Date: Tue, 24 Apr 2007 11:23:05 +1000
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden