HHH-10273 : Explicitly put column/table names that are DB2 keywords in quotes

(cherry picked from commit 642d42dc92)
This commit is contained in:
Gail Badner 2015-11-16 18:10:11 -08:00
parent e6e87517d1
commit 54a8b96251
10 changed files with 17 additions and 0 deletions

View File

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

View File

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

View File

@ -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"))

View File

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

View File

@ -1,5 +1,6 @@
package org.hibernate.test.annotations.derivedidentities.e3.b2;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;

View File

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

View File

@ -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;
}

View File

@ -3,6 +3,7 @@ package org.hibernate.test.annotations.derivedidentities.e3.b3;
import javax.persistence.*;
@Entity
@Table(name="`Dependent`")
public class Dependent {
@EmbeddedId

View File

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

View File

@ -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;
}