• 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: Postgresql + booleans = error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Postgresql + booleans = error


  • Subject: Re: Postgresql + booleans = error
  • From: Arturo Perez <email@hidden>
  • Date: Wed, 15 Feb 2006 10:46:17 -0500

Randall Perry wrote:
I used eomodeler to generate the model and EO classes from a Postgresql db.
I'm having a problem using the boolean data type. If I reference a boolean
field 'rec.campsiteFri()' like so:

if (rec.campsiteFri()) {
            return true;
        }

I get a compiler error 'incompatible types'. I can't use the field in
WOBuilder as it throws a java class cast exception.

I forget the details of handling this properly - they're in the mail archives somewhere. But the compiler error is due to your method not returning a boolean (note lowercase). Java won't coerce anything to a boolean automatically. So you'll have to figure out how to turn the campsiteFri() return value into a boolean.


-arturo


_______________________________________________ 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: 
 >Postgresql + booleans = error (From: Randall Perry <email@hidden>)

  • Prev by Date: Re: Postgresql + booleans = error
  • Next by Date: Monitor thinks instances are dead
  • Previous by thread: Re: Postgresql + booleans = error
  • Next by thread: Re: Postgresql + booleans = error
  • Index(es):
    • Date
    • Thread