[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3401) H2 Database Dialect Fixes

Thomas Mueller (JIRA) noreply at atlassian.com
Tue Mar 24 10:32:40 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32703#action_32703 ] 

Thomas Mueller commented on HHH-3401:
-------------------------------------

For H2, BIT and BOOLEAN are the same data type. The same as CHAR and CHARACTER are the same data type. If you create a table like this:

CREATE TABLE TEST(B BIT, C CHARACTER);

and then retrieve the meta data (using DatabaseMetaData) and re-construct the CREATE TABLE statement you get:

CREATE TABLE TEST(B BOOLEAN, C CHAR);

However Hibernate doesn't 'know' currently that BIT is BOOLEAN is the same, because of the H2Dialect. So when you start the test again, Hibernate says that the data type BOOLEAN is not compatible with BIT.

By the way this problem was found by Dan Allen. He works for Red Hat / JBoss now. See also http://www.manning-sandbox.com/thread.jspa?threadID=26080&tstart=0 

Please tell me if you have more question.

> H2 Database Dialect Fixes
> -------------------------
>
>                 Key: HHH-3401
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3401
>             Project: Hibernate Core
>          Issue Type: Patch
>          Components: core
>            Reporter: Thomas Mueller
>            Assignee: Steve Ebersole
>             Fix For: 3.2.x, 3.3.x, 3.5
>
>         Attachments: H2Dialect.java, H2Dialect.java.patch, test.zip
>
>
> There are a few bugs in the H2 Dialect:
> - There is no native BIT data type in H2.
> - The database function DATEDIFF does have parameters
> - There is a typo in function QUARTER
> I have created a patch and a simple test case: The problem with the BIT / BOOLEAN data type appears if you run the test twice. Please tell me if you need more information.
> Regards,
> Thomas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list