mirror of https://github.com/apache/openjpa.git
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:
parent
461471d174
commit
83916ff986
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue