public function createPersistence()
{
// operations of same type and in same collection executed at once
if (version_compare($this->getVersion(), '1.5', '>=') && version_compare($this->getDbVersion(), '2.6', '>=')) {
return new Persistence();
}
// all operations executed separately
return new PersistenceLegacy();
}