if (lastReturned == null)
throw new IllegalStateException();
if (_caller.owner != null) {
// Mark the field as dirty
StateManager stateManager = _caller.owner.jdoGetStateManager();
if (stateManager != null) {
PersistenceManager pm = (PersistenceManager) stateManager.getPersistenceManagerInternal();
pm.acquireShareLock();
try {
pm.acquireFieldUpdateLock();
try
{
stateManager.makeDirty(_caller.fieldName);
_iterator.remove();
if (added.remove(lastReturned) == false) {
removed.add(lastReturned);
}
stateManager.applyUpdates(_caller.fieldName, _caller);
} finally {
pm.releaseFieldUpdateLock();
}
}