-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Mapping of MySQL schema to java objects
PostPosted: Fri Oct 12, 2007 3:22 am 
Newbie

Joined: Fri Oct 12, 2007 2:58 am
Posts: 3
Hi,

I have a table in SQLServer 2005 with a column ABC. The data type of ABC is bit(1). When I use hibernate to generate the hbm.xml files and models/DAOs, it maps the bit(1) to boolean and everything works fine.

Now, when I replace SQLServer 2005 with MySQL, it maps the bit(1) to java.lang.Object and all hell breaks lose :(

My problem is that the MySQL database is getting generated from the schema exported from the SQLServer 2005 database. I cannot change the datatype of column ABC in the MySQL table. How do I get it to map bit(1) to boolean in MySQL too?

Any suggestions would be greatly appreciated.

- Neha.

PS: I forgot to mention, I'm a newbie at Hibernate :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.