[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2462) byte[] column type causes syntax error in PostgreSQL 8.2.3

Al Sutton (JIRA) noreply at atlassian.com
Fri Mar 2 11:50:34 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2462?page=comments#action_26365 ] 

Al Sutton commented on HHH-2462:
--------------------------------

After further investigation a duplicate dialect entry has been found in the mapping file which is for Derby (and thus using the DB2 dialect which includes the varchar() for bit data type.

I would like to suggest the idea of adding a warning or XML validation when the mapping file contains conflicting or duplicate dialect statements, this would help developers detect situations in which they've made dumb mistakes (like I have here)

> byte[] column type causes syntax error in PostgreSQL 8.2.3
> ----------------------------------------------------------
>
>          Key: HHH-2462
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2462
>      Project: Hibernate3
>         Type: Bug

>   Components: core
>     Versions: 3.2.2
>  Environment: Windows XP SP2
> PostgreSQL 8.2.3
> Hibernate 3.2.2
> Hibernate Annotations 3.2.1
>     Reporter: Al Sutton

>
>
> We have an object which has one property defined as a byte array. We're using <property name="hibernate.hbm2ddl.auto">update</property> in the hibernate mapping file to automatically create the schema.
> When we create the first hibernate session we get;
> 02-Mar-2007 12:56:49 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
> SEVERE: Unsuccessful: create table RegisteredUser (id bigint not null, username varchar(255), disabled smallint not null, emailAddress varchar(255), encryptedPassword varchar(255) for bit data, lastLogin bigint, searchCredits integer not null, privs bigint not null, person_fk bigint, primary key (id))
> 02-Mar-2007 12:56:49 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
> SEVERE: ERROR: syntax error at or near "for"
> resulting in the table not being created, and thus the application does not work.
> This appears to go against the Hibernate claim of POJO persistance.

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