src/relationships/HasManyRelationship.php 1 location
|
@@ 48-50 (lines=3) @@
|
| 45 |
|
if($this->options['foreign_key'] == null) { |
| 46 |
|
$this->options['foreign_key'] = Text::singularize($this->setupTable) . '_id'; |
| 47 |
|
} |
| 48 |
|
if($this->options['local_key'] == null) { |
| 49 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
} |
| 53 |
|
|
src/relationships/ManyHaveManyRelationship.php 1 location
|
@@ 68-70 (lines=3) @@
|
| 65 |
|
$this->options['foreign_key'] = $foreignModel->getDescription()->getPrimaryKey()[0]; |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
if ($this->options['local_key'] == null) { |
| 69 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
if (!isset($this->options['junction_local_key'])) { |
| 73 |
|
$this->options['junction_local_key'] = Text::singularize($this->setupTable) . '_id'; |