Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

boolean mapping

 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
weblogic server maps boolean fields in Entity Beans to varchar2(1) field in database as '0' and '1'. Are these mappings part of EJB specifications or are these addons provided by the servers?
If they are mentioned in ejb specifications , I would like to know where
 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I don't think that is part of the EJB spec.
What JDBC driver / database / OR mapping tool are you using?
 
mohit joshi
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using weblogic with oracle driver and oracle db.
I am now converting my boolean fields in Entity beans to Strings. I will try to see if the getter / setter methods can still return boolean arguments otherwise i will have to do major changes in my jsp codes
[This message has been edited by mohit joshi (edited November 10, 2000).]
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why not convert the boolean values to integer values? that way, you can use two static final attributes, perhaps intTrue and intFalse to represent a true and false value for an integer (maybe the values 1 and 0 respectively). I think there would be less overhead than using Strings that way, and there would be a direct mapping for an integer to your database.
I hope that helps.
 
What's a year in metric? Do you know this metric stuff tiny ad?
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic