Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate + Derby + boolean + SchemaExport

Carey Brown
Posts: 1752
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to use Hibernate with Derby I can pre-create the tables by running a hand built script and Derby lets me define a column as type 'boolean' and when I 'describe' the table it shows the column as 'boolean'. I'm attempting to use Hibernate's SchemaExport to create a sql script to avoid building it by hand as my project evolves. The problem that I get is that SchemaExport outputs a 'boolean' as a 'smallint' even when I define the type in the xml file to be 'boolean'. I've also looked at the source for the DerbyDialect and there's a line that says:

The export output looks like:

The '_ind' columns are the booleans.

Any ideas where I should be looking?

Thanks in advance.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic