|
|
|
Nullable ID columns are generated which causes test test failures for DB2 (because it does not allow primary key columns to be nullable).
Example 1:
{ { code} @Entity @IdClass(DependentId.class) public class Dependent { @Id String name; @Id @ManyToOne @JoinColumns({ @JoinColumn(name="FK1", referencedColumnName="firstName"), @JoinColumn(name="FK2", referencedColumnName="lastName") }) Employee emp; } {code } }
Reproduced by (both are regresssions):
org.hibernate.test.annotations.derivedidentities.e2.a.DerivedIdentityIdClassParentIdClassDepTest (Employee has {{@IdClass}}. org.hibernate.test.annotations.derivedidentities.e3.a.DerivedIdentityEmbeddedIdParentIdClassTest (Employee has {{@EmbeddedId}}.
Example 2:
{ {@Entity code} public class Dependent { @EmbeddedId DependentId id;
@MapsId("empPK") @JoinColumns({ @JoinColumn(name = "FK1", referencedColumnName = "FIRSTNAME"), @JoinColumn(name = "FK2", referencedColumnName = "lastName") }) @ManyToOne Employee emp; } {code } }
Reproduced by:
* org.hibernate.test.annotations.derivedidentities.e3.b.DerivedIdentityEmbeddedIdParentEmbeddedIdDepTest (Employee has @EmbeddedId) (regression).
Example 3:
{code} @Entity public class MedicalHistory { @EmbeddedId PersonId id;
@MapsId @JoinColumns({ @JoinColumn(name = "FK1", referencedColumnName = "firstName"), @JoinColumn(name = "FK2", referencedColumnName = "lastName") }) @OneToOne Person patient; } {code} Reproduced by:
* DerivedIdentityIdClassParentSameIdTypeEmbeddedIdDepTest (regression) * DerivedIdentityEmbeddedIdParentSameIdTypeEmbeddedIdDepTest (regression)
Following test also incorrectly generate ID columns that are nullable (introduced by HHH-5764):
DerivedIdentityEmbeddedIdParentEmbeddedIdGrandparentEmbeddedIdColumnOverridesDepTest DerivedIdentityEmbeddedIdParentSameIdTypeEmbeddedIdDepTest
|
|
|
|