mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 11:18:51 +02:00
Save element parameters in its own database table (dont use JSON)
This makes it easier to query for specific parameters.
This commit is contained in:
parent
a6e0f1738b
commit
719e21c0df
35 changed files with 738 additions and 183 deletions
|
@ -52,6 +52,7 @@ namespace App\Entity\Devices;
|
|||
|
||||
use App\Entity\Attachments\DeviceAttachment;
|
||||
use App\Entity\Base\AbstractPartsContainingDBElement;
|
||||
use App\Entity\Parameters\DeviceParameter;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use InvalidArgumentException;
|
||||
|
@ -97,6 +98,11 @@ class Device extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var DeviceParameter[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\DeviceParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
*/
|
||||
protected $parameters;
|
||||
|
||||
/********************************************************************************
|
||||
*
|
||||
* Getters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue