public function asVersionDateTime()
    {
        $this->verifyHasPropertyNameForVersioning(__METHOD__);
        $this->asDateTime();
        $this->definition->optimisticLocking(new DateTimeVersionLockingStrategy($this->propertyName, $this->name));
    }
public function asVersionDateTime()
    {
        $this->verifyHasPropertyNameForVersioning(__METHOD__);
        $this->asDateTime();
        $this->definition->optimisticLocking(new DateTimeVersionLockingStrategy($this->propertyName, $this->name));
    }
public function asVersionDateTime ( ) { $ this -> verifyHasPropertyNameForVersioning ( __METHOD__ ) ; $ this -> asDateTime ( ) ; $ this -> definition -> optimisticLocking ( new DateTimeVersionLockingStrategy ( $ this -> propertyName , $ this -> name ) ) ; }
Defines the column as an DATETIME type that will act as a versioning
column for optimistic locking. This column will be set the current UTC
datetime when the entity is saved. If the value in the database is out
of sync with the value being persisted an exception will be thrown.

@see EntityOutOfSyncException

@return void
Defines the column as an DATETIME type that will act as a versioning column for optimistic locking . This column will be set the current UTC datetime when the entity is saved . If the value in the database is out of sync with the value being persisted an exception will be thrown .