Re: Fetching a specified Object.
Re: Fetching a specified Object.
- Subject: Re: Fetching a specified Object.
- From: David LeBer <email@hidden>
- Date: Sat, 22 Mar 2008 21:55:42 -0400
On 22-Mar-08, at 9:40 PM, Gustavo Pizano wrote:
I used prototype boolean
and Externaltype its auto set to VARCHAR
dunno why
Ah, there be magic there. The ERPrototypes 'boolean' prototype defines:
Datatype: Custom
External Width: 5
Class: java.lang.Boolean
Factory Method: valueOf
Conversion Method: toString
Init Argument: String
So, when reading from the database it obtains the value by calling the
'Factory Method' on the 'Class' expecting a argument of the type
specified in the 'Init Argument':
Boolean.valueOf(String valueFromDB);
When writing to the db it gets the value by calling the 'Conversion
Method' on an instance of the 'Class':
Boolean valueToWrite;
valueToWrite.toString();
So the values in your database should be 'true' or 'false' (without
the quotes).
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org
_______________________________________________
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