Skip to content

Commit

Permalink
Merge pull request #1609 from ConductionNL/fix/BRK-54/maxDepth
Browse files Browse the repository at this point in the history
Hotfix for BRK too large objects
  • Loading branch information
rjzondervan authored Jan 16, 2024
2 parents 4b00ecb + aaf6dda commit d779fcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/src/Entity/ObjectEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,11 @@ public function toArray(array $configuration = []): array
$config['maxDepth'] = $attribute->getObject()->getMaxDepth() + $config['level'];
}
$config['level'] = $config['level'] + 1;

//TODO: This is a very hacky solution that has to be changed back ASAP
if ($attribute->getObject() === $this->getEntity()) {
$config['maxDepth'] = $config['level'];
}
$objectToArray = $object->toArray($config);

// Check if we want an embedded array
Expand Down

0 comments on commit d779fcd

Please sign in to comment.