Modify the assocation between PrivacyPolicy and Warranty to ManyToOne. #256
This commit is contained in:
parent
ff1e634cdc
commit
b8504c3701
2 changed files with 6 additions and 1 deletions
|
|
@ -48,6 +48,11 @@ class PrivacyPolicy
|
|||
*/
|
||||
protected $cust_promo;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Warranty", mappedBy="privacy_policy")
|
||||
*/
|
||||
protected $warranties;
|
||||
|
||||
public function getID()
|
||||
{
|
||||
return $this->id;
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class Warranty
|
|||
|
||||
// privacy policy
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="PrivacyPolicy")
|
||||
* @ORM\ManyToOne(targetEntity="PrivacyPolicy", inversedBy="warranties")
|
||||
* @ORM\JoinColumn(name="warranty_privacy_policy", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
protected $privacy_policy;
|
||||
|
|
|
|||
Loading…
Reference in a new issue