public ORecord loadRecord(final ORID iRid, final ORecord iRecord, final String iFetchPlan, final boolean ignoreCache,
final boolean loadTombstone, final OStorage.LOCKING_STRATEGY iLockingStrategy) {
checkTransaction();
final ORecord txRecord = getRecord(iRid);
if (txRecord == OTransactionRealAbstract.DELETED_RECORD)
// DELETED IN TX
return null;
if (txRecord != null) {
if (iRecord != null && txRecord != iRecord)
OLogManager.instance().warn(
this,
"Found record in transaction with the same RID %s but different instance. "
+ "Probably the record has been loaded from another transaction and reused on the current one: reload it "
+ "from current transaction before to update or delete it", iRecord.getIdentity());
return txRecord;
}
if (iRid.isTemporary())
return null;
// DELEGATE TO THE STORAGE, NO TOMBSTONES SUPPORT IN TX MODE
final ORecord record = database.executeReadRecord((ORecordId) iRid, iRecord, iFetchPlan, ignoreCache, false, iLockingStrategy);
if (record != null)
addRecord(record, ORecordOperation.LOADED, null);
return record;