HHH-10273 : Explicitly put column/table names that are DB2 keywords in quotes
This commit is contained in:
parent
5a98ded540
commit
642d42dc92
|
@ -11,11 +11,13 @@ import javax.persistence.IdClass;
|
|||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinColumns;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "`Dependent`")
|
||||
@IdClass(DependentId.class)
|
||||
public class Dependent {
|
||||
@Id
|
||||
|
|
|
@ -12,11 +12,13 @@ import javax.persistence.IdClass;
|
|||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinColumns;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "`Dependent`")
|
||||
@IdClass(DependentId.class)
|
||||
public class Dependent {
|
||||
@Id
|
||||
|
|
|
@ -13,11 +13,13 @@ import javax.persistence.JoinColumn;
|
|||
import javax.persistence.JoinColumns;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.MapsId;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="`Dependent`")
|
||||
public class Dependent {
|
||||
// default column name for "name" attribute is overridden
|
||||
@AttributeOverride(name = "name", column = @Column(name = "dep_name"))
|
||||
|
|
|
@ -4,8 +4,10 @@ import javax.persistence.EmbeddedId;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.MapsId;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name="`Dependent`")
|
||||
public class Dependent {
|
||||
|
||||
@EmbeddedId
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.hibernate.test.annotations.derivedidentities.e3.b2;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
|
|
@ -4,8 +4,10 @@ import javax.persistence.EmbeddedId;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.MapsId;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name="`Policy`")
|
||||
public class Policy {
|
||||
@EmbeddedId
|
||||
PolicyId id;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package org.hibernate.test.annotations.derivedidentities.e3.b2;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Embeddable
|
||||
public class PolicyId implements Serializable {
|
||||
@Column(name = "`type`", length = 32)
|
||||
String type;
|
||||
DependentId depPK;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.hibernate.test.annotations.derivedidentities.e3.b3;
|
|||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name="`Dependent`")
|
||||
public class Dependent {
|
||||
|
||||
@EmbeddedId
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.hibernate.test.annotations.derivedidentities.e3.b3;
|
|||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name="`Policy`")
|
||||
public class Policy {
|
||||
@EmbeddedId
|
||||
PolicyId id;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package org.hibernate.test.annotations.derivedidentities.e3.b3;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Embeddable
|
||||
public class PolicyId implements Serializable {
|
||||
@Column(name="`type`")
|
||||
String type;
|
||||
DependentId depPK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue