OPENJPA-2164. If the field being requested is already loaded, then skip the overhead and just return the field value.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1307608 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kevin W. Sutter 2012-03-30 20:56:44 +00:00
parent 461471d174
commit 83916ff986
1 changed files with 5 additions and 0 deletions

View File

@ -1593,6 +1593,11 @@ public class StateManagerImpl
public void accessingField(int field) {
// possibly change state
try {
// If this field is loaded, and not a PK field allow pass through
// TODO -- what about version fields? Could probably UT this
if(_loaded.get(field) && !_meta.getField(field).isPrimaryKey())
return;
beforeRead(field);
beforeAccessField(field);
} catch (RuntimeException re) {