• 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: Mapping PSQL Boolean into Java Number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mapping PSQL Boolean into Java Number


  • Subject: Re: Mapping PSQL Boolean into Java Number
  • From: Kevin Windham <email@hidden>
  • Date: Mon, 9 Apr 2007 17:24:25 -0500

I use the method on this page that is also in Chuck and Sacha's book. Works nicely and should be db independent.

<http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/Modeling/ Booleans>

Kevin


On Apr 9, 2007, at 4:29 PM, Catarina Vieira Simoes wrote:

Hi!

I'm working on a project that is being deployed in two different environments: one uses a Postgres database and the other an Oracle database. Both databases have the same data and the application has (and must have) the same code for both environments.
While in Oracle the boolean table columns (which is actually a column that contains 0s and 1s since Oracle does not support booleans) are mapped into Number database type, in Postgres that same columns are being mapped into Boolean database type. All seems to work fine in WebObjects 5.2: specifically, the conversions between PSQL Booleans and Java Numbers are done seamlessly.


When I upgraded to WebObjects 5.3.3 I started to have java.lang.ClassCastException. It seems that the new version of WebObjects can't make the conversion from Boolean to Number.
I then decided to create a Custom Data Type, a subclasse of Number, that converts the boolean values in PSQL database (t and f) into Number. I changed the PSQL model accordingly but it seems that conversion is not being done correctly and the application breaks.
Is it possible to do this? And how? :)


Thank you in advance.
Sincerely,

Catarina

_______________________________________________ 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
References: 
 >Mapping PSQL Boolean into Java Number (From: Catarina Vieira Simoes <email@hidden>)

  • Prev by Date: Re: DisplayGroup Basics
  • Next by Date: Re: DisplayGroup Basics
  • Previous by thread: Mapping PSQL Boolean into Java Number
  • Next by thread: How to debug fetch problem
  • Index(es):
    • Date
    • Thread