Gail Badner the issue is related with
AbstractTransactSQLDialect#applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames)
implementation, the alias substitution relies on the order of
LockOptions#getAliasLockIterator()
being the same of the position of the aliases inside the sql String. Unfortunately the aliases in
are stored in an
so with a Entity class named Person it seems that the person1_ alias is returned before the person0_, but in the sql string person0_ comes before person1_, so person1_ is substituted first and then a correction factor is applied to calculate the start position of person0_ causing the second lock string to be placed in the wrong position. I'm going to submit a fix soon. |