OPENJPA-2423: Isolation level is not working properly on DB2 for JPQL queries with nested sub-queries - committed to 2.1.x the patch/fix provided by Pinaki Poddar.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.1.x@1517838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Heath Thomann 2013-08-27 14:49:06 +00:00
parent d600018d6a
commit edfa79ca39
1 changed files with 2 additions and 1 deletions

View File

@ -469,7 +469,8 @@ public class DB2Dictionary
break;
}
} else {
if ( fetch != null && fetch.getIsolation() == Connection.TRANSACTION_READ_UNCOMMITTED ) {
if ( fetch != null && fetch.getIsolation() == Connection.TRANSACTION_READ_UNCOMMITTED
&& sel.getParent() == null) { // i.e. not a subquery
forUpdateString.append(" ").append(forReadOnlyClause)
.append(" ").append(withURClause);
}