src/relationships/HasManyRelationship.php 1 location
|
@@ 54-56 (lines=3) @@
|
| 51 |
|
if($this->options['foreign_key'] == null) { |
| 52 |
|
$this->options['foreign_key'] = Text::singularize($this->setupTable) . '_id'; |
| 53 |
|
} |
| 54 |
|
if($this->options['local_key'] == null) { |
| 55 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 56 |
|
} |
| 57 |
|
} |
| 58 |
|
} |
| 59 |
|
|
src/relationships/ManyHaveManyRelationship.php 1 location
|
@@ 70-72 (lines=3) @@
|
| 67 |
|
$this->options['foreign_key'] = $foreignModel->getDescription()->getPrimaryKey()[0]; |
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
if ($this->options['local_key'] == null) { |
| 71 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
if (!isset($this->options['junction_local_key'])) { |
| 75 |
|
$this->options['junction_local_key'] = Text::singularize($this->setupTable) . '_id'; |