@@ -53,7 +53,7 @@ |
||
53 | 53 | $this->options['foreign_key'] = $model->getDescription()->getPrimaryKey()[0]; |
54 | 54 | } |
55 | 55 | if ($this->options['local_key'] == null) { |
56 | - $this->options['local_key'] = Text::singularize($table) . '_id'; |
|
56 | + $this->options['local_key'] = Text::singularize($table).'_id'; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 |
@@ -26,8 +26,8 @@ |
||
26 | 26 | |
27 | 27 | namespace ntentan\nibii\relationships; |
28 | 28 | |
29 | -use ntentan\utils\Text; |
|
30 | 29 | use ntentan\nibii\ORMContext; |
30 | +use ntentan\utils\Text; |
|
31 | 31 | |
32 | 32 | class BelongsToRelationship extends \ntentan\nibii\Relationship |
33 | 33 | { |
@@ -12,7 +12,17 @@ |
||
12 | 12 | interface ModelFactoryInterface |
13 | 13 | { |
14 | 14 | public function createModel($name, $context); |
15 | + |
|
16 | + /** |
|
17 | + * @param \ntentan\nibii\RecordWrapper $instance |
|
18 | + * |
|
19 | + * @return string |
|
20 | + */ |
|
15 | 21 | public function getModelTable($instance); |
16 | 22 | public function getClassName($model); |
23 | + |
|
24 | + /** |
|
25 | + * @return string |
|
26 | + */ |
|
17 | 27 | public function getJunctionClassName($classA, $classB); |
18 | 28 | } |
19 | 29 | \ No newline at end of file |