mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-05 07:54:35 +02:00
Moved getParts() and getPartsCount() to a repository (instead of a class method).
This commit is contained in:
parent
350f1bb979
commit
14adb77a97
24 changed files with 421 additions and 71 deletions
|
@ -54,7 +54,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
* This unit represents the unit in which the amount of parts in stock are measured.
|
||||
* This could be something like N, grams, meters, etc...
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="App\Repository\StructuralDBElementRepository")
|
||||
* @ORM\Entity(repositoryClass="App\Repository\Parts\MeasurementUnitRepository")
|
||||
* @ORM\Table(name="`measurement_units`")
|
||||
* @UniqueEntity("unit")
|
||||
*/
|
||||
|
@ -94,10 +94,6 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $parent;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Part", mappedBy="partUnit", fetch="EXTRA_LAZY")
|
||||
*/
|
||||
protected $parts;
|
||||
/**
|
||||
* @var Collection<int, MeasurementUnitAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\MeasurementUnitAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue