mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-16 15:51:24 +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
|
@ -65,11 +65,11 @@ class NamedDBElementRepository extends DBElementRepository
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the list of all nodes to use in a select box.
|
||||
* Returns a flattened list of all nodes.
|
||||
* @return AbstractNamedDBElement[]
|
||||
* @phpstan-return array<int, AbstractNamedDBElement>
|
||||
*/
|
||||
public function toNodesList(): array
|
||||
public function getFlatList(): array
|
||||
{
|
||||
//All nodes are sorted by name
|
||||
return $this->findBy([], ['name' => 'ASC']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue