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".
This commit is contained in:
Jesse Sightler 2014-01-17 22:35:39 -05:00 committed by Steve Ebersole
parent 691c8e239a
commit 84b032da1d
1 changed files with 2 additions and 2 deletions

View File

@ -125,10 +125,10 @@ public class SelectStatementBuilder {
private String cleanRestrictions(String restrictions) {
restrictions = restrictions.trim();
if ( restrictions.startsWith( "and" ) ) {
if ( restrictions.startsWith( "and " ) ) {
restrictions = restrictions.substring( 4 );
}
if ( restrictions.endsWith( "and" ) ) {
if ( restrictions.endsWith( " and" ) ) {
restrictions = restrictions.substring( 0, restrictions.length()-4 );
}