• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fetching a specified Object.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Fetching a specified Object.
      • From: Gustavo Pizano <email@hidden>
References: 
 >Fetching a specified Object. (From: Gustavo Pizano <email@hidden>)
 >Re: Fetching a specified Object. (From: David LeBer <email@hidden>)
 >Re: Fetching a specified Object. (From: David LeBer <email@hidden>)
 >Re: Fetching a specified Object. (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: Fetching a specified Object.
  • Next by Date: Re: Fetching a specified Object.
  • Previous by thread: Re: Fetching a specified Object.
  • Next by thread: Re: Fetching a specified Object.
  • Index(es):
    • Date
    • Thread