mirror of https://github.com/apache/openjpa.git
OPENJPA-209: Detect identical instances being added to L1 cache multiple times during a load session.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@666515 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d965db7271
commit
f1ac625b2c
|
@ -70,6 +70,8 @@ class ProjectionResultObjectProvider
|
|||
public Object getResultObject()
|
||||
throws Exception {
|
||||
Result res = getResult();
|
||||
// for a projection, Result has no base mapping
|
||||
res.setBaseMapping(null);
|
||||
int idx = res.indexOf();
|
||||
Object[] arr = new Object[_exps[idx].projections.length];
|
||||
for (int i = 0; i < _exps[idx].projections.length; i++)
|
||||
|
|
|
@ -311,7 +311,9 @@ public class StateManagerImpl
|
|||
|
||||
// initialize our state and add ourselves to the broker's cache
|
||||
setPCState(state);
|
||||
_broker.setStateManager(_id, this, BrokerImpl.STATUS_INIT);
|
||||
if (_broker.getStateManagerImplById(getObjectId(), false) == null) {
|
||||
_broker.setStateManager(_id, this, BrokerImpl.STATUS_INIT);
|
||||
}
|
||||
if (state == PCState.PNEW)
|
||||
fireLifecycleEvent(LifecycleEvent.AFTER_PERSIST);
|
||||
|
||||
|
|
Loading…
Reference in New Issue