src/relationships/HasManyRelationship.php 1 location
|
@@ 45-47 (lines=3) @@
|
| 42 |
|
|
| 43 |
|
public function runSetup() |
| 44 |
|
{ |
| 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 |
|
} |
src/relationships/ManyHaveManyRelationship.php 1 location
|
@@ 75-78 (lines=4) @@
|
| 72 |
|
$this->options['local_key'] = $this->setupPrimaryKey[0]; |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
if(!isset($this->options['junction_local_key'])) { |
| 76 |
|
$this->options['junction_local_key'] = |
| 77 |
|
Text::singularize($this->setupTable) . '_id'; |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
if(!isset($this->options['junction_foreign_key'])) { |
| 81 |
|
$this->options['junction_foreign_key'] = |