Skip to content

Commit cd036a6

Browse files
jmartisksebersole
authored andcommitted
[HHH-10188] "stored" is a reserved keyword
(cherry picked from commit 1fa78f9)
1 parent 1741e0f commit cd036a6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

hibernate-core/src/test/java/org/hibernate/test/legacy/Qux.hbm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</many-to-one>
2020
<property name="deleted"/>
2121
<property name="loaded"/>
22-
<property name="stored"/>
22+
<property name="store"/>
2323
<property name="created"/>
2424
<property name="childKey" type="long"/>
2525
<property name="stuff"/>

hibernate-core/src/test/java/org/hibernate/test/legacy/Qux.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class Qux implements Lifecycle {
2222
boolean created;
2323
boolean deleted;
2424
boolean loaded;
25-
boolean stored;
25+
boolean store; // this should more logically be named "stored" but that's a reserved keyword on MySQL 5.7
2626
private Long key;
2727
private String stuff;
2828
private Set fums;
@@ -102,11 +102,11 @@ private void setLoaded(boolean loaded) {
102102
this.loaded = loaded;
103103
}
104104

105-
public boolean getStored() {
106-
return stored;
105+
public boolean getStore() {
106+
return store;
107107
}
108-
private void setStored(boolean stored) {
109-
this.stored = stored;
108+
private void setStore(boolean store) {
109+
this.store = store;
110110
}
111111

112112
public Long getKey() {
@@ -144,7 +144,7 @@ public void setMoreFums(List moreFums) {
144144
}
145145

146146
public Qux getChild() throws HibernateException, SQLException {
147-
stored=true;
147+
store =true;
148148
this.childKey = child==null ? null : child.getKey();
149149
if (childKey!=null && child==null) child = (Qux) session.load(Qux.class, childKey);
150150
return child;

0 commit comments

Comments
 (0)