We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9573fc6 commit 0690292Copy full SHA for 0690292
1 file changed
src/Database/Conventions/DiscoveredConventions.php
@@ -84,7 +84,7 @@ public function getBelongsToReference(string $table, string $key): ?array
84
$tableColumns = $this->structure->getBelongsToReference($table);
85
86
foreach ($tableColumns as $column => $targetTable) {
87
- if (stripos($column, $key) !== false) {
+ if ($column === $key . '_id' || $column === $key . 'Id' || $column === 'id_' . $key) {
88
return [$targetTable, $column];
89
}
90
0 commit comments