Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzylka committed Jan 9, 2025
1 parent 256987a commit 2937ae0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function setId(?int $id = null): self
*/
public function bind(
BindType|array $bind,
string $tableName = null,
?string $tableName = null,
?string $primaryKey = null,
?string $foreignKey = null,
null|array|Condition $condition = null
Expand All @@ -119,12 +119,10 @@ public function bind(
if (is_string($value)) {
$explodeName = explode('.', $value);
$bindType = BindType::getFromName($explodeName[0]);

$this->bind($bindType, $explodeName[1]);
} else {
$explodeName = explode('.', $key);
$bindType = BindType::getFromName($explodeName[0]);

$this->bind($bindType, $explodeName[1], $value['primaryKey'] ?? null, $value['foreignKey'] ?? null);
}
}
Expand Down

0 comments on commit 2937ae0

Please sign in to comment.