[hibernate-issues] [Hibernate-JIRA] Created: (HBX-1102) @Temporal Annotation not generated in Composite-ID-Pojo

Nils M (JIRA) noreply at atlassian.com
Tue Jan 6 07:24:38 EST 2009


@Temporal Annotation not generated in Composite-ID-Pojo
-------------------------------------------------------

                 Key: HBX-1102
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1102
             Project: Hibernate Tools
          Issue Type: Bug
          Components: reverse-engineer
    Affects Versions: 3.2.4 Beta1
         Environment: Database: DB2
Hibernate-Tools: 3.2.4.Beta1, Hibernate-Tools.3.2.4.CR1
            Reporter: Nils M


We do have a problem with generating pojos from a DB using hibernate tools. 
We have several tables with a composite ID, e.g. in table T100 these are the fields 'DATE_FROM' and 'UB_ID'. The Hibernate Tool generate the following pojos from that table. The problem we have is, that within the first class the Annotation '@Temporal' is used, but in the second class the Annotation is missing. The DB (IBM DB2) responds with an error without this Annotation. 
We used the Hibernate Tools 3.2.4.Beta1 and 3.2.4.CR1. The result is the same with both versions.
	
	
Table T100Ub
===========

@Entity
@Table(name="T100_UB"
)
public class T100Ub  implements java.io.Serializable {
private T100UbId id;
private Date dateUntil;
....
@Temporal(TemporalType.DATE)
@Column(name="DATE_UNTIL", nullable=false, length=10)
     public Date getDateUntil() {
          return this.dateUntil;
     }
...
}


Table T100UbId
=============

@Embeddable
public class T100UbId  implements java.io.Serializable {
private int ubId;
private Date dateFrom;
...
@Column(name="DATE_FROM", nullable=false, length=10)
     public Date getDateFrom() {
           return this.dateFrom;
     }
...
}


Thanks a lot in advance!

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