• 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
Modelling boolean in D2W compliant way
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modelling boolean in D2W compliant way


  • Subject: Modelling boolean in D2W compliant way
  • From: Markus Ruggiero <email@hidden>
  • Date: Wed, 16 Mar 2011 14:53:04 +0100

I have a (Oracle) table where boolean attributes are defined as char(1) with possible values "Y", "N", or NULL (is equivalent to "N"). Due to 3rd party apps I cannot change the database to char(5) and use the standard modelling technique of toString() and valueOf() with Strings "true" and "false" in the DB. How can I model such an attribute  in a D2W compliant way? I have tried the following: rename the attribute in EOModel to "publishedYN" but leave the column name "published" and added published() and setPublished() to the business logic. This works and I can e.g. use ERD2WCustomeQueryBoolean in my query page configuration. However when I click query I get the following exception:

java.lang.IllegalStateException: sqlStringForKeyValueQualifier: attempt to generate SQL for com.webobjects.eocontrol.EOKeyValueQualifier (publish = (java.lang.Boolean)'false') failed because attribute identified by key 'publish' was not reachable from from entity 'TechdocType'

Yes, there is no such attribute and thus the crash makes sense. How can I fix this? Any ideas? Unfortunately it is not possible to extend java.lang.Boolean

Help and lots of thanks
---markus---
 _______________________________________________
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: Modelling boolean in D2W compliant way
      • From: Markus Ruggiero <email@hidden>
  • Prev by Date: Re: [Q] D2W sorting lists with property level custom component
  • Next by Date: Re: Can't launch from JavaMonitor
  • Previous by thread: Re: Are generated SQL index name truncations harmless?
  • Next by thread: Re: Modelling boolean in D2W compliant way
  • Index(es):
    • Date
    • Thread