[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6801) UUIDBinaryType generates column of type BINARY(255) instead of BINARY(16) in MySQL

Cody Lerum (JIRA) noreply at atlassian.com
Mon Apr 30 15:13:48 EDT 2012


    [ https://hibernate.onjira.com/browse/HHH-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46466#comment-46466 ] 

Cody Lerum commented on HHH-6801:
---------------------------------

Seeing same with annotations on ORM 4.0.1

@Type(type = "org.hibernate.type.UUIDBinaryType")
public UUID getUuid() {
   return uuid;
}

public void setUuid(UUID uuid) {
   this.uuid = uuid;
}

> UUIDBinaryType generates column of type BINARY(255) instead of BINARY(16) in MySQL
> ----------------------------------------------------------------------------------
>
>                 Key: HHH-6801
>                 URL: https://hibernate.onjira.com/browse/HHH-6801
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.8
>         Environment: MySQL 5.1 InnoDB
> Custom dialect (see HHH-6800)
>            Reporter: Artem Gelun
>
> Property definition:
> {code:xml}
> <property access="field" name="uuid" not-null="true" type="uuid-binary">
>    <column name="MI_UUID" not-null="true"/>
> </property>
> {code}
> Debug:
> {code}
> 00:13:35,312 DEBUG SchemaExport:415 - create table PCS_MI (MI_CONTAINER bigint not null, MI_ID integer not null, MI_CODE varchar(255), MI_NAME varchar(255), MI_DESCRIPTION varchar(255), MI_TYPE bigint, MI_STATE_CALC_RULE varchar(255), MI_STATE_DICT bigint, MI_EMERG_CALC_RULE varchar(255), MI_ISACTIVE bit default true not null, MI_PARENT_CONTAINER bigint, MI_PARENT_ID integer, MI_UUID binary(255) not null, primary key (MI_CONTAINER, MI_ID)) ENGINE=InnoDB
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list