[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3055) Incorrect type of SQLServer column for Java 'float' field

Guillaume Grussenmeyer (JIRA) noreply at atlassian.com
Fri May 23 05:50:37 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30251 ] 

Guillaume Grussenmeyer commented on HHH-3055:
---------------------------------------------

In order not to have Hibernate schema validation telling you your DB schema is invalid because "double" Java fields are mapped to "float" columns, one must also add the following registration in her custom dialect:

registerColumnTyp( Types.DOUBLE, "float" );

Else, Hibernate will complain that the double Java field is mapped to a "float" column while it should be mapped to a "double precision" one (although the column was created by Hibernate itself...).

> Incorrect type of SQLServer column for Java 'float' field
> ---------------------------------------------------------
>
>                 Key: HHH-3055
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3055
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.1
>         Environment: Hibernate Annotations 3.3.0.GA
> Hibernate EntityManager 3.3.1.GA 
> Hibernate 3.2.1
> Microsoft SQL Server, version: 9.00.3042
> Microsoft SQL Server 2005 JDBC Driver, version: 1.1.1501.101 
>            Reporter: Guillaume Grussenmeyer
>
> When mapping a Java field of type 'float' to a SQLServer table, the corresponding database column is created with type 'float', which is not correct as SQL Server floats are double precision, while Java floats are simple precision.
> The corresponding column should be created with type "real".

-- 
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