Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Boolean type in Persistance problem

 
masse Satriana
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
Please correct me if there are some mistake by me.
I'm using JPA to use or/m in my projects.
I have table let say " customers" which one of attribute is "valid" with bit type.
In my POJO class its mapped to Boolean type,then I using operation from EntityManager with queryNamed("findByValid");

for example :


The problem is it throw some exception : oracle.toplink.essentials.exceptions.ConversionException

Can I use bit type in database(mysql) and mapped it to Boolean?
Every suggestion would be appreciate.
Thanks in advance.

--- masse satriana ---
 
masse Satriana
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi case is closed by me
This is caused by type 'bit' in tables.
I shortly change to type 'tinyint'. and it works fine.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic