Skip to content

Commit

Permalink
fix: wrongly formed parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
williarin committed Jul 18, 2024
1 parent 17406c5 commit d4ddd8a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/Bridge/Repository/AbstractEntityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function getMappedMetaKey(string $fieldName, string $entityClassName = nu
$mappedFields = $targetClass->getMappedFields();
} else {
// BC layer, to be removed when MAPPED_FIELDS constant is removed
$mappedFields = (new \ReflectionClassConstant($targetClass, 'MAPPED_FIELDS',))->getValue();
$mappedFields = (new \ReflectionClassConstant($targetClass, 'MAPPED_FIELDS'))->getValue();
}

if (
Expand Down Expand Up @@ -257,7 +257,7 @@ public function isFieldMapped(string $fieldName, string $entityClassName = null)
$mappedFields = $targetClass->getMappedFields();
} else {
// BC layer, to be removed when MAPPED_FIELDS constant is removed
$mappedFields = (new \ReflectionClassConstant($targetClass, 'MAPPED_FIELDS',))->getValue();
$mappedFields = (new \ReflectionClassConstant($targetClass, 'MAPPED_FIELDS'))->getValue();
}

if (
Expand Down Expand Up @@ -408,10 +408,7 @@ private function getWhereExpressionFromCriteriaField(
string $entityClassName = null,
int $aliasNumber = null,
): CompositeExpression {
$snakeField = u($field)
->snake()
->toString()
;
$snakeField = str_replace('.', '_', u($field) ->snake() ->toString());
$parameter = ":{$snakeField}";
$operator = '=';
$prefixedField = $field;
Expand Down Expand Up @@ -476,10 +473,7 @@ private function getWhereExpressionFromCriteriaField(
])]
private function flattenOperand(QueryBuilder $queryBuilder, Operand $operand, string $field, mixed $value): array
{
$snakeField = u($field)
->snake()
->toString()
;
$snakeField = str_replace('.', '_', u($field) ->snake() ->toString());
$parameter = ":{$snakeField}";
$operator = $operand->getOperator();

Expand Down

0 comments on commit d4ddd8a

Please sign in to comment.