File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
tests/fixtures/MakeFormForEntity/src/Entity Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace App \Entity ;
4
+
5
+ use Doctrine \ORM \Mapping as ORM ;
6
+
7
+ /**
8
+ * @ORM\Entity
9
+ */
10
+ class Property
11
+ {
12
+ /**
13
+ * @ORM\Column(name="id", type="integer")
14
+ * @ORM\Id
15
+ * @ORM\GeneratedValue(strategy="AUTO")
16
+ */
17
+ private $ id ;
18
+
19
+ /**
20
+ * Many Features have One Product.
21
+ * @ORM\ManyToOne(targetEntity="App\Entity\SourFood", inversedBy="properties")
22
+ * @ORM\JoinColumn(name="sour_food_id", referencedColumnName="id")
23
+ */
24
+ private $ sourFood ;
25
+ }
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Entity ;
4
4
5
+ use Doctrine \Common \Collections \ArrayCollection ;
5
6
use Doctrine \ORM \Mapping as ORM ;
6
7
7
8
/**
@@ -21,6 +22,16 @@ class SourFood
21
22
*/
22
23
private $ title ;
23
24
25
+ /**
26
+ * @ORM\OneToMany(targetEntity="App\Entity\Property", mappedBy="sourFood")
27
+ */
28
+ private $ properties ;
29
+
30
+ public function __construct ()
31
+ {
32
+ $ this ->properties = new ArrayCollection ();
33
+ }
34
+
24
35
/**
25
36
* @return mixed
26
37
*/
You can’t perform that action at this time.
0 commit comments