This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate + Derby + boolean + SchemaExport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate + Derby + boolean + SchemaExport" Watch "Hibernate + Derby + boolean + SchemaExport" New topic

Hibernate + Derby + boolean + SchemaExport

Carey Brown
Ranch Hand

Joined: Nov 19, 2001
Posts: 173

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.
It is sorta covered in the JavaRanch Style Guide.
subject: Hibernate + Derby + boolean + SchemaExport
Similar Threads
Posting one selected option value in two forms
Seems to insert but doesn't end up in the database
Error when inserting data in hibernate
Hibernate Mapping Types.
javax.jms.JMSSecurityException: User null is NOT authenticated