Skip to content

Commit edbdc83

Browse files
author
zhangjunfeng
committed
embeding field name with parent.
1 parent 5db4068 commit edbdc83

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/QueryEntityClassProperty.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ public void alias(String alias) {
7272
* @return Alias.
7373
*/
7474
public String alias() {
75-
return F.isEmpty(alias) ? name : alias;
75+
// modify@byron
76+
return F.isEmpty(alias) ? fullName() : alias;
77+
//-return F.isEmpty(alias) ? name : alias;
7678
}
7779

7880
/**

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/QueryEntityTypeDescriptor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public Class<?> keyClass() {
169169
* @param failOnDuplicate Fail on duplicate flag.
170170
*/
171171
public void addProperty(QueryEntityClassProperty prop, QuerySqlField sqlAnn, boolean key, boolean failOnDuplicate) {
172-
String propName = prop.name();
172+
String propName = prop.fullName(); // modify@byron
173173

174174
if (sqlAnn != null && !F.isEmpty(sqlAnn.name()))
175175
propName = sqlAnn.name();
@@ -180,10 +180,10 @@ public void addProperty(QueryEntityClassProperty prop, QuerySqlField sqlAnn, boo
180180
"QueryEntity [key=" + keyCls.getName() + ", value=" + valCls.getName() + ']');
181181
}
182182

183-
fields.put(prop.fullName(), prop.type());
183+
fields.put(propName, prop.type());
184184

185185
if (key)
186-
keyProps.add(prop.fullName());
186+
keyProps.add(propName);
187187
}
188188

189189
/**

0 commit comments

Comments
 (0)