YAML driver uses getAssociationCacheDefaults for SLC mapping
This commit is contained in:
parent
7d64be915c
commit
acbda4bc0e
@ -388,12 +388,12 @@ class YamlDriver extends FileDriver
|
|||||||
$mapping['orphanRemoval'] = (bool)$oneToOneElement['orphanRemoval'];
|
$mapping['orphanRemoval'] = (bool)$oneToOneElement['orphanRemoval'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$metadata->mapOneToOne($mapping);
|
|
||||||
|
|
||||||
// Evaluate second level cache
|
// Evaluate second level cache
|
||||||
if (isset($oneToOneElement['cache'])) {
|
if (isset($oneToOneElement['cache'])) {
|
||||||
$metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($oneToOneElement['cache']));
|
$mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], $this->cacheToArray($oneToOneElement['cache']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$metadata->mapOneToOne($mapping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,12 +426,13 @@ class YamlDriver extends FileDriver
|
|||||||
$mapping['indexBy'] = $oneToManyElement['indexBy'];
|
$mapping['indexBy'] = $oneToManyElement['indexBy'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$metadata->mapOneToMany($mapping);
|
|
||||||
|
|
||||||
// Evaluate second level cache
|
// Evaluate second level cache
|
||||||
if (isset($oneToManyElement['cache'])) {
|
if (isset($oneToManyElement['cache'])) {
|
||||||
$metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($oneToManyElement['cache']));
|
$mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], $this->cacheToArray($oneToManyElement['cache']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$metadata->mapOneToMany($mapping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -475,12 +476,12 @@ class YamlDriver extends FileDriver
|
|||||||
$mapping['cascade'] = $manyToOneElement['cascade'];
|
$mapping['cascade'] = $manyToOneElement['cascade'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$metadata->mapManyToOne($mapping);
|
|
||||||
|
|
||||||
// Evaluate second level cache
|
// Evaluate second level cache
|
||||||
if (isset($manyToOneElement['cache'])) {
|
if (isset($manyToOneElement['cache'])) {
|
||||||
$metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($manyToOneElement['cache']));
|
$mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], $this->cacheToArray($manyToOneElement['cache']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$metadata->mapManyToOne($mapping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,12 +553,12 @@ class YamlDriver extends FileDriver
|
|||||||
$mapping['orphanRemoval'] = (bool)$manyToManyElement['orphanRemoval'];
|
$mapping['orphanRemoval'] = (bool)$manyToManyElement['orphanRemoval'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$metadata->mapManyToMany($mapping);
|
|
||||||
|
|
||||||
// Evaluate second level cache
|
// Evaluate second level cache
|
||||||
if (isset($manyToManyElement['cache'])) {
|
if (isset($manyToManyElement['cache'])) {
|
||||||
$metadata->enableAssociationCache($mapping['fieldName'], $this->cacheToArray($manyToManyElement['cache']));
|
$mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], $this->cacheToArray($manyToManyElement['cache']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$metadata->mapManyToMany($mapping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user