@@ -81,24 +81,21 @@ protected String substituteBrackets(String sqlQuery) throws QueryException {
8181 final char ch = sqlQuery .charAt ( index );
8282 switch (ch ) {
8383 case '\'' :
84- if (!doubleQuoted && !escaped ) {
85- singleQuoted = !singleQuoted ;
86- }
8784 if (escaped ) {
8885 token .append (ch );
89- } else {
86+ }
87+ else {
88+ if (!doubleQuoted ) {
89+ singleQuoted = !singleQuoted ;
90+ }
9091 result .append (ch );
9192 }
9293 break ;
9394 case '"' :
9495 if (!singleQuoted && !escaped ) {
9596 doubleQuoted = !doubleQuoted ;
9697 }
97- if (escaped ) {
98- token .append (ch );
99- } else {
100- result .append (ch );
101- }
98+ result .append (ch );
10299 break ;
103100 case '{' :
104101 if (!singleQuoted && !doubleQuoted ) {
@@ -224,7 +221,7 @@ private String resolveCollectionProperties(
224221 }
225222 aliasesFound ++;
226223 return collectionPersister .selectFragment ( aliasName , collectionSuffix )
227- + ", " + resolveProperties ( aliasName , propertyName );
224+ + ", " + resolveProperties ( aliasName , propertyName );
228225 case "element.*" :
229226 return resolveProperties ( aliasName , "*" );
230227 default :
@@ -274,7 +271,7 @@ private void validate(String aliasName, String propertyName, String[] columnAlia
274271 // TODO: better error message since we actually support composites if names are explicitly listed
275272 throw new QueryException (
276273 "SQL queries only support properties mapped to a single column - property [" +
277- propertyName + "] is mapped to " + columnAliases .length + " columns." ,
274+ propertyName + "] is mapped to " + columnAliases .length + " columns." ,
278275 originalQueryString
279276 );
280277 }
0 commit comments