| @@ 91-114 (lines=24) @@ | ||
| 88 | /** |
|
| 89 | * Set up oneToOne relation fixtures |
|
| 90 | */ |
|
| 91 | private function setUpOneToOneRelation() |
|
| 92 | { |
|
| 93 | $this->data['user']['_related']['oneToOne'] = array( |
|
| 94 | 'Customer' => array( |
|
| 95 | '_relation' => array( |
|
| 96 | 'targetEntity' => 'Customer', |
|
| 97 | 'joinColumn' => array( |
|
| 98 | 'name' => 'customer_id', |
|
| 99 | 'referencedColumnName' => 'id', |
|
| 100 | ), |
|
| 101 | 'table' => 'customer', |
|
| 102 | ), |
|
| 103 | '_data' => array( |
|
| 104 | 'Customer' => array( |
|
| 105 | '_table' => 'customer', |
|
| 106 | '_identifier' => 'sku', |
|
| 107 | 'sku' => '1', |
|
| 108 | 'email' => '[email protected]', |
|
| 109 | 'last_purchased' => '2015-06-26T22:22:00+0200', |
|
| 110 | ), |
|
| 111 | ), |
|
| 112 | ) |
|
| 113 | ); |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * Set up oneToMany relation fixtures |
|
| @@ 150-173 (lines=24) @@ | ||
| 147 | /** |
|
| 148 | * Set up manyToOne relation fixtures |
|
| 149 | */ |
|
| 150 | private function setUpManyToOneRelation() |
|
| 151 | { |
|
| 152 | $this->data['user']['_related']['manyToOne'] = array( |
|
| 153 | 'Address' => array( |
|
| 154 | '_relation' => array( |
|
| 155 | 'targetEntity' => 'Address', |
|
| 156 | 'joinColumn' => array( |
|
| 157 | 'name' => 'address_id', |
|
| 158 | 'referencedColumnName' => 'id', |
|
| 159 | ), |
|
| 160 | 'table' => 'address', |
|
| 161 | ), |
|
| 162 | '_data' => array( |
|
| 163 | 'Address' => array( |
|
| 164 | '_table' => 'address', |
|
| 165 | '_identifier' => 'sku', |
|
| 166 | 'sku' => '1', |
|
| 167 | 'postal_code' => '34000', |
|
| 168 | 'city' => 'Montpellier', |
|
| 169 | ), |
|
| 170 | ), |
|
| 171 | ) |
|
| 172 | ); |
|
| 173 | } |
|
| 174 | ||
| 175 | /** |
|
| 176 | * Set up manyToMany relation fixtures |
|