Won't Fix
Details
Assignee
Koen AersKoen AersReporter
Nils MNils MBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Koen AersMax Rydahl AndersenNils MCommunity Help Wanted
Yes, pleaseComponents
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Koen Aers
Koen AersReporter
Nils M
Nils MBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Koen Aers
Max Rydahl Andersen
Nils M
Community Help Wanted
Yes, please
Components
Fix versions
Affects versions
Priority
Created January 6, 2009 at 2:23 PM
Updated December 9, 2024 at 4:38 PM
Resolved December 9, 2024 at 4:38 PM
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!