public function setVersionMapping(array &$mapping)
{
if ($mapping['type'] !== 'int' && $mapping['type'] !== 'date') {
throw LockException::invalidVersionFieldType($mapping['type']);
}
$this->isVersioned = true;
$this->versionField = $mapping['fieldName'];
}