[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3579) Support for PostgreSQL UUID data type

David Driscoll (JIRA) noreply at atlassian.com
Mon Aug 17 20:00:15 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Driscoll updated HHH-3579:
--------------------------------

    Attachment: patch_HH_3579_PostgresSQLDialect.txt
                patch_HH_3579_NullableType.txt
                patch_HH_3579_Hibernate.txt

I noticed that Hibernate did not have support for UUID as well.
But, fortunately the guys over in NHibernate to implement UUID support for PostgreSQL.
WIth the help of the NHibernate implementation , I have create a patches to support this in Hibernate.
This is the first 3 of 5 patch files.

> Support for PostgreSQL UUID data type
> -------------------------------------
>
>                 Key: HHH-3579
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3579
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 3.3.1
>            Reporter: Olivier Van Acker
>         Attachments: patch_HH_3579_Hibernate.txt, patch_HH_3579_NullableType.txt, patch_HH_3579_PostgresSQLDialect.txt
>
>
> PostgreSQL has since version 8.3 UUID as data type nativly supported in the database. 
> The only way to get this to work in Hibernate is to add <column name="id" sql-type="uuid"/> to your mappings file (or @columnDefinition via annotations)
> and create your own custom usertype (e.g. public class UUIDUserType implements UserType, Serializable {..} ) and map this to java.util.UUID 
> worth mentioning is that java.util.UUID is only introduced in java 1.5 so there might be a backwards compatibility problem
>  

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