ODatabaseRecordThreadLocal.INSTANCE.set(db2);
ORecordBytes record2 = db2.load(record1.getIdentity());
record2.setDirty();
record2.fromStream("This is the second version".getBytes());
record2.save();
ODatabaseRecordThreadLocal.INSTANCE.set(database);
record1.setDirty();
record1.fromStream("This is the third version".getBytes());