EJB-405 - Changed the column name for properties which are reserved keywords in some databases
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15677 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
468743d2a7
commit
8719e10c1c
|
@ -18,7 +18,7 @@ import org.hibernate.annotations.IndexColumn;
|
||||||
@Entity
|
@Entity
|
||||||
public class Race {
|
public class Race {
|
||||||
@Id @GeneratedValue public Integer id;
|
@Id @GeneratedValue public Integer id;
|
||||||
@IndexColumn( name="index" ) @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
@IndexColumn( name="index_" ) @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||||
@org.hibernate.annotations.Cascade( { org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
|
@org.hibernate.annotations.Cascade( { org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
|
||||||
public List<Competitor> competitors = new ArrayList<Competitor>();
|
public List<Competitor> competitors = new ArrayList<Competitor>();
|
||||||
public String name;
|
public String name;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//$Id$
|
//$Id$
|
||||||
package org.hibernate.ejb.test.inheritance;
|
package org.hibernate.ejb.test.inheritance;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,6 +11,7 @@ import javax.persistence.Entity;
|
||||||
public class Strawberry extends Fruit {
|
public class Strawberry extends Fruit {
|
||||||
private Long size;
|
private Long size;
|
||||||
|
|
||||||
|
@Column(name="size_")
|
||||||
public Long getSize() {
|
public Long getSize() {
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import javax.persistence.Version;
|
||||||
/**
|
/**
|
||||||
* @author Emmanuel Bernard
|
* @author Emmanuel Bernard
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity(name="Lock_")
|
||||||
public class Lock {
|
public class Lock {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private Integer version;
|
private Integer version;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//$Id$
|
//$Id$
|
||||||
package org.hibernate.ejb.test.ops;
|
package org.hibernate.ejb.test.ops;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
@ -14,5 +15,6 @@ public class Workload {
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
public Integer id;
|
public Integer id;
|
||||||
public String name;
|
public String name;
|
||||||
|
@Column(name="load_")
|
||||||
public Integer load;
|
public Integer load;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue