@@ -86,24 +86,21 @@ protected String substituteBrackets(String sqlQuery) throws QueryException {
86
86
final char ch = sqlQuery .charAt ( index );
87
87
switch (ch ) {
88
88
case '\'' :
89
- if (!doubleQuoted && !escaped ) {
90
- singleQuoted = !singleQuoted ;
91
- }
92
89
if (escaped ) {
93
90
token .append (ch );
94
- } else {
91
+ }
92
+ else {
93
+ if (!doubleQuoted ) {
94
+ singleQuoted = !singleQuoted ;
95
+ }
95
96
result .append (ch );
96
97
}
97
98
break ;
98
99
case '"' :
99
100
if (!singleQuoted && !escaped ) {
100
101
doubleQuoted = !doubleQuoted ;
101
102
}
102
- if (escaped ) {
103
- token .append (ch );
104
- } else {
105
- result .append (ch );
106
- }
103
+ result .append (ch );
107
104
break ;
108
105
case '{' :
109
106
if (!singleQuoted && !doubleQuoted ) {
@@ -228,7 +225,7 @@ private String resolveCollectionProperties(
228
225
}
229
226
aliasesFound ++;
230
227
return collectionPersister .selectFragment ( aliasName , collectionSuffix )
231
- + ", " + resolveProperties ( aliasName , propertyName );
228
+ + ", " + resolveProperties ( aliasName , propertyName );
232
229
case "element.*" :
233
230
return resolveProperties ( aliasName , "*" );
234
231
default :
@@ -278,7 +275,7 @@ private void validate(String aliasName, String propertyName, String[] columnAlia
278
275
// TODO: better error message since we actually support composites if names are explicitly listed
279
276
throw new QueryException (
280
277
"SQL queries only support properties mapped to a single column - property [" +
281
- propertyName + "] is mapped to " + columnAliases .length + " columns." ,
278
+ propertyName + "] is mapped to " + columnAliases .length + " columns." ,
282
279
originalQueryString
283
280
);
284
281
}
0 commit comments