@Temporal Annotation not generated in Composite-ID-Pojo

Description

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!

Environment

Database: DB2 Hibernate-Tools: 3.2.4.Beta1, Hibernate-Tools.3.2.4.CR1

Activity

Show:

Koen AersDecember 9, 2024 at 4:38 PM

I am closing this issue as it did not have any relevant updates since 2009. Please feel free to reopen it if you think it is still relevant.

Nils MFebruary 16, 2009 at 1:48 PM

Sorry,

I did not see your answer. I'll attach a sample asap.

Max Rydahl AndersenFebruary 5, 2009 at 2:28 PM

could you attach a sample schema for this one ?

Won't Fix

Details

Assignee

Reporter

Bug 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