Skip to content

Commit

Permalink
Fix locking when ClassMetadata is unserialized
Browse files Browse the repository at this point in the history
Caching / unserializing ClassMetadata broke locking functionality

Fixes doctrine#2278
  • Loading branch information
buffcode authored Feb 3, 2021
1 parent 9bbfccb commit 887a62e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,11 @@ public function __sleep()
$serialized[] = 'versionField';
}

if ($this->isLockable) {
$serialized[] = 'isLockable';
$serialized[] = 'lockField';
}

if ($this->lifecycleCallbacks) {
$serialized[] = 'lifecycleCallbacks';
}
Expand Down

0 comments on commit 887a62e

Please sign in to comment.