HHH-10259 : ForUpdateFragment.toFragmentString() does not check if aliases are defined when lockOptions are not null

(cherry picked from commit fc077401e7)
This commit is contained in:
John O'Hara 2015-11-05 16:33:07 +00:00 committed by Gail Badner
parent 1d5b0779d6
commit 1852162da5
1 changed files with 6 additions and 1 deletions

View File

@ -88,7 +88,12 @@ public class ForUpdateFragment {
public String toFragmentString() {
if ( lockOptions!= null ) {
return dialect.getForUpdateString( aliases.toString(), lockOptions );
if ( aliases.length() == 0) {
return dialect.getForUpdateString( lockOptions );
}
else {
return dialect.getForUpdateString( aliases.toString(), lockOptions );
}
}
else if ( aliases.length() == 0) {
if ( lockMode != null ) {