Skip to content

Commit

Permalink
Update Database.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Idrinth authored Jan 9, 2025
1 parent df8259a commit 4a5a259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function load(string $class, array $parameters = []): array
throw new InvalidEntityException("class $class has no usable constructor");
}
$table = (new UnicodeString($rc->getShortName()))->snake()->toString();
$query = "SELECT * FROM {$table} WHERE 1;";
$query = "SELECT * FROM {$table} WHERE 1";
foreach (array_keys($parameters) as $key) {
$column = (new UnicodeString($key))->snake()->toString();
$query .= " AND {$column} = :{$key}";
Expand Down

0 comments on commit 4a5a259

Please sign in to comment.