Author: epbernard
Date: 2008-08-13 14:15:05 -0400 (Wed, 13 Aug 2008)
New Revision: 15056
Modified:
annotations/trunk/src/test/org/hibernate/test/annotations/cascade/Mouth.java
annotations/trunk/src/test/org/hibernate/test/annotations/embedded/Summary.java
annotations/trunk/src/test/org/hibernate/test/annotations/inheritance/Tomato.java
annotations/trunk/src/test/org/hibernate/test/annotations/inheritance/mixed/Document.java
annotations/trunk/src/test/org/hibernate/test/annotations/query/Chaos.java
Log:
JBPAPP-1073 Oracle has "size" as a reserved keyword. Wondering what word in the
dictionary is not reserved
Modified: annotations/trunk/src/test/org/hibernate/test/annotations/cascade/Mouth.java
===================================================================
---
annotations/trunk/src/test/org/hibernate/test/annotations/cascade/Mouth.java 2008-08-13
17:25:18 UTC (rev 15055)
+++
annotations/trunk/src/test/org/hibernate/test/annotations/cascade/Mouth.java 2008-08-13
18:15:05 UTC (rev 15056)
@@ -7,6 +7,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
+import javax.persistence.Column;
/**
* @author Emmanuel Bernard
@@ -16,6 +17,7 @@
@Id
@GeneratedValue
public Integer id;
+ @Column(name="mouth_size")
public int size;
@OneToMany(mappedBy = "mouth", cascade = CascadeType.REMOVE)
public Collection<Tooth> teeth;
Modified: annotations/trunk/src/test/org/hibernate/test/annotations/embedded/Summary.java
===================================================================
---
annotations/trunk/src/test/org/hibernate/test/annotations/embedded/Summary.java 2008-08-13
17:25:18 UTC (rev 15055)
+++
annotations/trunk/src/test/org/hibernate/test/annotations/embedded/Summary.java 2008-08-13
18:15:05 UTC (rev 15056)
@@ -2,6 +2,7 @@
package org.hibernate.test.annotations.embedded;
import javax.persistence.Embeddable;
+import javax.persistence.Column;
import org.hibernate.annotations.Parent;
@@ -14,6 +15,7 @@
private String text;
private Book summarizedBook;
+ @Column(name="summary_size")
public int getSize() {
return size;
}
Modified:
annotations/trunk/src/test/org/hibernate/test/annotations/inheritance/Tomato.java
===================================================================
---
annotations/trunk/src/test/org/hibernate/test/annotations/inheritance/Tomato.java 2008-08-13
17:25:18 UTC (rev 15055)
+++
annotations/trunk/src/test/org/hibernate/test/annotations/inheritance/Tomato.java 2008-08-13
18:15:05 UTC (rev 15056)
@@ -4,6 +4,7 @@
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
+import javax.persistence.Column;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
@@ -21,6 +22,7 @@
public class Tomato extends Vegetable {
private int size;
+ @Column(name="tom_size")
public int getSize() {
return size;
}
Modified:
annotations/trunk/src/test/org/hibernate/test/annotations/inheritance/mixed/Document.java
===================================================================
---
annotations/trunk/src/test/org/hibernate/test/annotations/inheritance/mixed/Document.java 2008-08-13
17:25:18 UTC (rev 15055)
+++
annotations/trunk/src/test/org/hibernate/test/annotations/inheritance/mixed/Document.java 2008-08-13
18:15:05 UTC (rev 15056)
@@ -25,7 +25,7 @@
this.size = size;
}
- @Column(table = "DocumentMixed", nullable = false)
+ @Column(table = "DocumentMixed", name="doc_size", nullable = false)
public int getSize() {
return size;
}
Modified: annotations/trunk/src/test/org/hibernate/test/annotations/query/Chaos.java
===================================================================
--- annotations/trunk/src/test/org/hibernate/test/annotations/query/Chaos.java 2008-08-13
17:25:18 UTC (rev 15055)
+++ annotations/trunk/src/test/org/hibernate/test/annotations/query/Chaos.java 2008-08-13
18:15:05 UTC (rev 15056)
@@ -23,15 +23,16 @@
*/
@Entity
@Table(name="CHAOS")
-@SQLInsert( sql="INSERT INTO CHAOS(name, nick_name, size, id)
VALUES(upper(?),?,?,?)")
-@SQLUpdate( sql="UPDATE CHAOS SET name = upper(?), nick_name = ?, size = ? WHERE id
= ?")
+@SQLInsert( sql="INSERT INTO CHAOS(name, nick_name, chaos_size, id)
VALUES(upper(?),?,?,?)")
+@SQLUpdate( sql="UPDATE CHAOS SET name = upper(?), nick_name = ?, cha0s_size = ?
WHERE id = ?")
@SQLDelete( sql="DELETE CHAOS WHERE id = ?")
@SQLDeleteAll( sql="DELETE CHAOS")
@Loader(namedQuery = "chaos")
-@NamedNativeQuery(name="chaos", query="select id, size, name, lower(
nick_name ) as nick_name from CHAOS where id= ?", resultClass = Chaos.class)
+@NamedNativeQuery(name="chaos", query="select id, chaos_size, name, lower(
nick_name ) as nick_name from CHAOS where id= ?", resultClass = Chaos.class)
public class Chaos {
@Id
private Long id;
+ @Column(name="chaos_size")
private Long size;
private String name;
@Column(name="nick_name")