mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +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
|
@ -92,7 +92,7 @@ class StructuralDBElementRepositoryTest extends WebTestCase
|
|||
public function testToNodesListRoot(): void
|
||||
{
|
||||
//List all root nodes and their children
|
||||
$nodes = $this->repo->toNodesList();
|
||||
$nodes = $this->repo->getFlatList();
|
||||
|
||||
$this->assertCount(7, $nodes);
|
||||
$this->assertContainsOnlyInstancesOf(AttachmentType::class, $nodes);
|
||||
|
@ -109,7 +109,7 @@ class StructuralDBElementRepositoryTest extends WebTestCase
|
|||
{
|
||||
//List all nodes that are children to Node 1
|
||||
$node1 = $this->repo->find(1);
|
||||
$nodes = $this->repo->toNodesList($node1);
|
||||
$nodes = $this->repo->getFlatList($node1);
|
||||
|
||||
$this->assertCount(3, $nodes);
|
||||
$this->assertContainsOnlyInstancesOf(AttachmentType::class, $nodes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue