1
0
mirror of synced 2025-02-09 00:39:25 +03:00

Add version fields into L2C data

This commit is contained in:
‘Andrey Lukin’ 2018-02-16 11:48:31 +03:00 committed by Luís Cobucci
parent 8fc1d74820
commit 8e73926359
No known key found for this signature in database
GPG Key ID: EC61C5F01750ED3C

View File

@ -75,6 +75,10 @@ class DefaultEntityHydrator implements EntityHydrator
$data = $this->uow->getOriginalEntityData($entity);
$data = array_merge($data, $metadata->getIdentifierValues($entity)); // why update has no identifier values ?
if ($metadata->isVersioned) {
$data[$metadata->versionField] = $metadata->getFieldValue($entity, $metadata->versionField);
}
foreach ($metadata->associationMappings as $name => $assoc) {
if ( ! isset($data[$name])) {
continue;