From cb0ca8f009a53d1856ec082674b35714c355407f Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Sat, 27 Mar 2010 17:56:32 +0000 Subject: [PATCH] OPENJPA-1597 Rollback MSSQL reserved word, but update Rider test entity failure on MSSQL git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@928241 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/openjpa/jdbc/sql/AbstractSQLServerDictionary.java | 2 +- .../org/apache/openjpa/persistence/proxy/entities/Rider.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractSQLServerDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractSQLServerDictionary.java index ea258d0f8..9652f5d2b 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractSQLServerDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractSQLServerDictionary.java @@ -37,7 +37,7 @@ public abstract class AbstractSQLServerDictionary extends DBDictionary { public AbstractSQLServerDictionary() { - reservedWordSet.addAll(Arrays.asList(new String[]{ "FILE", "INDEX", "RULE" })); + reservedWordSet.addAll(Arrays.asList(new String[]{ "FILE", "INDEX" })); systemTableSet.add("DTPROPERTIES"); validationSQL = "SELECT GETDATE()"; rangePosition = RANGE_POST_DISTINCT; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java index e97b8c6b4..6974736d0 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java @@ -25,8 +25,10 @@ import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; +import javax.persistence.Table; @Entity +@Table(name="RIDER_ANNUITY") @AttributeOverride(name="lastUpdateDate", column=@Column(name="LAST_UPDATE_TS")) public class Rider extends AnnuityPersistebleObject implements IRider { private static final long serialVersionUID = 2088116709551706187L; @@ -42,6 +44,8 @@ public class Rider extends AnnuityPersistebleObject implements IRider { public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } + + @Column(name="RIDER_RULE") public String getRule() { return rule; }