mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 05:24:28 +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
|
@ -35,6 +35,8 @@ trait MasterAttachmentTrait
|
|||
* @var Attachment|null
|
||||
* Mapping is done in the subclasses (e.g. Part), like with the attachments.
|
||||
* If this is done here (which is possible in theory), the attachment is not lazy loaded anymore, which causes unnecessary overhead.
|
||||
*
|
||||
* !!! If you change this name, you have to change it in the fetchHint in the AttachmentContainingDBElementRepository (getElementsAndPreviewAttachmentByIDs()) too !!!
|
||||
*/
|
||||
#[Assert\Expression('value == null or value.isPicture()', message: 'part.master_attachment.must_be_picture')]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue