Re: Internal Data Type for BOOL
Re: Internal Data Type for BOOL
- Subject: Re: Internal Data Type for BOOL
- From: Alan Ward <email@hidden>
- Date: Tue, 3 Jun 2003 14:29:16 -0700
On Tuesday, June 3, 2003, at 02:24 PM, Alan Ward wrote:
>
> On Tuesday, June 3, 2003, at 01:37 PM, Rob Myers wrote:
>
>> I spent today struggling with this.
>>
>> Use 'Integer'.
>
> or Number
>
>> In EOModeler make sure its data type is set to 'c' rather than 'i'
>> or anything else.
>
> This is the key point
>
>> Then swizzle the generated classes to have the accessors take and
>> return Boolean.
>
> By simply casting, like so...
>
> public Boolean getFoo() {
> return (Boolean)storedValueForKey("foo");
> }
>
> public void setFoo(Boolean val) {
> takeStoredValueForKey(val, "foo");
> }
>
> Alan
>
>> - Rob.
>>
>>
>> On Tuesday, June 3, 2003, at 06:11 PM, Alex Eagar wrote:
>>
>>> I'm designing a new database for a WebObjects application. In
>>> EOModeler I have an attribute called "gender" with an External Type
>>> as "BOOL" (using MySQL). What is the best Internal Data Type or in
>>> other words, what's the best Value Class to use? Can I simply use a
>>> Java "boolean"?
>>> _______________________________________________
>>> webobjects-dev mailing list | email@hidden
>>> Help/Unsubscribe/Archives:
>>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>>> Do not post admin requests to the list. They will be ignored.
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.