src/relationships/HasManyRelationship.php 1 location
|
@@ 58-60 (lines=3) @@
|
| 55 |
|
if ($this->options['foreign_key'] == null) { |
| 56 |
|
$this->options['foreign_key'] = Text::singularize($this->setupTable) . '_id'; |
| 57 |
|
} |
| 58 |
|
if ($this->options['local_key'] == null) { |
| 59 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 60 |
|
} |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
} |
src/relationships/ManyHaveManyRelationship.php 1 location
|
@@ 81-83 (lines=3) @@
|
| 78 |
|
$this->options['foreign_key'] = $foreignModel->getDescription()->getPrimaryKey()[0]; |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
if ($this->options['local_key'] == null) { |
| 82 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
if (!isset($this->options['junction_local_key'])) { |
| 86 |
|
$this->options['junction_local_key'] = Text::singularize($this->setupTable) . '_id'; |