Skip to content

Commit dc6906c

Browse files
committed
strict convention WIP
- na umeligenci byl problem, že $event->id chapal jako 'courseId'
1 parent 63efcec commit dc6906c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Conventions/DiscoveredConventions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function getBelongsToReference(string $table, string $key): ?array
8484
$tableColumns = $this->structure->getBelongsToReference($table);
8585

8686
foreach ($tableColumns as $column => $targetTable) {
87-
if (stripos($column, $key) !== false) {
87+
if ($column === $key . '_id' || $column === $key . 'Id' || $column === 'id_' . $key) {
8888
return [$targetTable, $column];
8989
}
9090
}

0 commit comments

Comments
 (0)