Skip to content

Commit dcad957

Browse files
jsightsebersole
authored andcommitted
HHH-8884 : Made this only remove "and " and " and"
Made this only remove "and " and " and" as otherwise tables named "android" end up being queried as "roid". (cherry picked from commit 84b032d)
1 parent 0765dce commit dcad957

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hibernate-core/src/main/java/org/hibernate/loader/plan/exec/query/internal/SelectStatementBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ public void appendRestrictions(String restrictions) {
125125

126126
private String cleanRestrictions(String restrictions) {
127127
restrictions = restrictions.trim();
128-
if ( restrictions.startsWith( "and" ) ) {
128+
if ( restrictions.startsWith( "and " ) ) {
129129
restrictions = restrictions.substring( 4 );
130130
}
131-
if ( restrictions.endsWith( "and" ) ) {
131+
if ( restrictions.endsWith( " and" ) ) {
132132
restrictions = restrictions.substring( 0, restrictions.length()-4 );
133133
}
134134

0 commit comments

Comments
 (0)