Use Embeddables for EDACategoryInfo instead of a json column

This commit is contained in:
Jan Böhmer 2023-11-30 19:13:32 +01:00
parent d5f002ac20
commit b76b2740a7
13 changed files with 280 additions and 150 deletions

View file

@ -41,6 +41,7 @@ use App\ApiPlatform\Filter\EntityFilter;
use App\ApiPlatform\Filter\LikeFilter;
use App\ApiPlatform\Filter\PartStoragelocationFilter;
use App\Entity\Attachments\AttachmentTypeAttachment;
use App\Entity\EDA\EDAPartInfo;
use App\Entity\Parts\PartTraits\AssociationTrait;
use App\Entity\Parts\PartTraits\EDATrait;
use App\Repository\PartRepository;
@ -175,6 +176,7 @@ class Part extends AttachmentContainingDBElement
//By default, the part has no provider
$this->providerReference = InfoProviderReference::noProvider();
$this->eda_info = new EDAPartInfo();
}
public function __clone()
@ -210,6 +212,7 @@ class Part extends AttachmentContainingDBElement
//Deep clone info provider
$this->providerReference = clone $this->providerReference;
$this->eda_info = clone $this->eda_info;
}
parent::__clone();
}