fixes php5.3 defines ~ for default empty _parent property
This commit is contained in:
parent
a36ec87f40
commit
10eae2f254
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ class ModelToElasticaAutoTransformer implements ModelToElasticaTransformerInterf
|
|||
$document = new \Elastica_Document($identifier);
|
||||
foreach ($fields as $key => $mapping) {
|
||||
$property = new PropertyPath($key);
|
||||
if (!empty($mapping['_parent'])) {
|
||||
if (!empty($mapping['_parent']) && $mapping['_parent'] !== '~') {
|
||||
$parent = $property->getValue($object);
|
||||
$identifierProperty = new PropertyPath($mapping['_parent']['identifier']);
|
||||
$document->setParent($identifierProperty->getValue($parent));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue