[hibernate-issues] [Hibernate-JIRA] Created: (HBX-1148) @Id annotation appears to cause suppression of TemporalType.DATE

John J. Genoese (JIRA) noreply at atlassian.com
Thu Oct 15 11:14:41 EDT 2009


@Id annotation appears to cause suppression of TemporalType.DATE
----------------------------------------------------------------

                 Key: HBX-1148
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1148
             Project: Hibernate Tools
          Issue Type: Bug
         Environment: PostgreSQL 8.4
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
[hibernatetool]  INFO [Thread-0] (Version.java:15) - Hibernate Annotations 3.3.1.Beta1
[hibernatetool]  INFO [Thread-0] (Environment.java:514) - Hibernate 3.2.4.sp1



            Reporter: John J. Genoese
         Attachments: NonBusinessDate.java

@Id appears to cause suppression of TemporalType.DATE. 

In the attached .java file, I've included two java.util.Date fields, one of which is marked with @Id. Both fields are marked with @Temporal(Timestamp.DATE). The @Id field gets generated as 'timestamp', and the non-Id field gets generated as 'date' (which is the desired outcome. 

The .java file is attached. The output DDL is included here. 


    create table public.nonbusinessdate (
        nbdate timestamp not null,
        nbdate2 date not null,
        primary key (nbdate),
        unique (nbdate)
    );


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