mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-17 04:40:08 -07:00
Fix Inventory_Set entity
This commit is contained in:
parent
3135105d0b
commit
c755f0f418
@ -38,9 +38,18 @@ class Inventory
|
||||
*/
|
||||
protected $inventoryParts;
|
||||
|
||||
/**
|
||||
* @var Collection
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Rebrickable\Inventory_Set", mappedBy="inventory")
|
||||
*/
|
||||
protected $inventorySets;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->inventoryParts = new ArrayCollection();
|
||||
$this->inventorySets = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -90,4 +99,20 @@ class Inventory
|
||||
{
|
||||
$this->inventoryParts = $inventoryParts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getInventorySets()
|
||||
{
|
||||
return $this->inventorySets;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $inventorySets
|
||||
*/
|
||||
public function setInventorySets($inventorySets)
|
||||
{
|
||||
$this->inventorySets = $inventorySets;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class Inventory_Set
|
||||
/**
|
||||
* @var Inventory
|
||||
* @ORM\Id
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Rebrickable\Inventory", inversedBy="inventoryParts")
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Rebrickable\Inventory", inversedBy="inventorySets")
|
||||
*/
|
||||
protected $inventory;
|
||||
|
||||
|
@ -60,6 +60,7 @@ class Set
|
||||
public function __construct()
|
||||
{
|
||||
$this->inventories = new ArrayCollection();
|
||||
$this->inventorySets = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,8 +45,9 @@ class RebrickableLoaderService extends BaseLoaderService
|
||||
|
||||
private function truncateTables()
|
||||
{
|
||||
$query =
|
||||
'TRUNCATE TABLE rebrickable_inventory_parts;
|
||||
$query ='
|
||||
TRUNCATE TABLE rebrickable_inventory_parts;
|
||||
TRUNCATE TABLE rebrickable_inventory_sets;
|
||||
TRUNCATE TABLE rebrickable_color;
|
||||
TRUNCATE TABLE rebrickable_inventory;
|
||||
TRUNCATE TABLE rebrickable_set;
|
||||
|
Loading…
x
Reference in New Issue
Block a user