mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Do not cache entities directly in NodesListBuilder but cache only the IDs instead
Otherwise the doctrine proxies break, and we get issues with loading the preview_images in structural Elements.
This commit is contained in:
parent
2e8cb35acc
commit
8ce5f4a796
9 changed files with 173 additions and 25 deletions
|
@ -32,7 +32,7 @@ use RecursiveIteratorIterator;
|
|||
* @template TEntityClass of AbstractStructuralDBElement
|
||||
* @extends NamedDBElementRepository<TEntityClass>
|
||||
*/
|
||||
class StructuralDBElementRepository extends NamedDBElementRepository
|
||||
class StructuralDBElementRepository extends AttachmentContainingDBElementRepository
|
||||
{
|
||||
/**
|
||||
* @var array An array containing all new entities created by getNewEntityByPath.
|
||||
|
@ -85,7 +85,7 @@ class StructuralDBElementRepository extends NamedDBElementRepository
|
|||
* @return AbstractStructuralDBElement[] a flattened list containing the tree elements
|
||||
* @phpstan-return array<int, TEntityClass>
|
||||
*/
|
||||
public function toNodesList(?AbstractStructuralDBElement $parent = null): array
|
||||
public function getFlatList(?AbstractStructuralDBElement $parent = null): array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue