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

Mapping PSQL Boolean into Java Number


  • Subject: Mapping PSQL Boolean into Java Number
  • From: Catarina Vieira Simoes <email@hidden>
  • Date: Mon, 9 Apr 2007 22:29:55 +0100

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


  • Follow-Ups:
    • Re: Mapping PSQL Boolean into Java Number
      • From: Kevin Windham <email@hidden>
  • Prev by Date: JSModalWindow issue
  • Next by Date: Re: DisplayGroup Basics
  • Previous by thread: JSModalWindow issue
  • Next by thread: Re: Mapping PSQL Boolean into Java Number
  • Index(es):
    • Date
    • Thread