Skip to content

Commit

Permalink
Fix awais-vteams#43 - wrong order of keys in hasMany and hasOne relat…
Browse files Browse the repository at this point in the history
…ions.
  • Loading branch information
adwiv committed Dec 17, 2024
1 parent 3906f4a commit 857f850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ModelGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ protected function getOtherRelations()
'name' => $isUniqueColumn ? 'hasOne' : 'hasMany',
'relation_name' => Str::camel($isUniqueColumn ? Str::singular($table) : Str::plural($table)),
'class' => Str::studly(Str::singular($table)),
'foreign_key' => $relation['foreign_columns'][0],
'owner_key' => $relation['columns'][0],
'owner_key' => $relation['foreign_columns'][0],
'foreign_key' => $relation['columns'][0],
];
}
}
Expand Down

0 comments on commit 857f850

Please sign in to comment.