mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 05:55:16 +01: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user