Skip to content

Commit

Permalink
strict convention WIP
Browse files Browse the repository at this point in the history
- na umeligenci byl problem, že $event->id chapal jako 'courseId'
  • Loading branch information
dg committed Jan 9, 2025
1 parent 9573fc6 commit 0690292
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Conventions/DiscoveredConventions.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function getBelongsToReference(string $table, string $key): ?array
$tableColumns = $this->structure->getBelongsToReference($table);

foreach ($tableColumns as $column => $targetTable) {
if (stripos($column, $key) !== false) {
if ($column === $key . '_id' || $column === $key . 'Id' || $column === 'id_' . $key) {
return [$targetTable, $column];
}
}
Expand Down

0 comments on commit 0690292

Please sign in to comment.