Skip to content

Commit 06ccd53

Browse files
authored
Merge pull request #66
2 parents 9d96e8d + d4ddd8a commit 06ccd53

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

src/Bridge/Repository/AbstractEntityRepository.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public function getMappedMetaKey(string $fieldName, string $entityClassName = nu
229229
$mappedFields = $targetClass->getMappedFields();
230230
} else {
231231
// BC layer, to be removed when MAPPED_FIELDS constant is removed
232-
$mappedFields = (new \ReflectionClassConstant($targetClass, 'MAPPED_FIELDS',))->getValue();
232+
$mappedFields = (new \ReflectionClassConstant($targetClass, 'MAPPED_FIELDS'))->getValue();
233233
}
234234

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

263263
if (
@@ -408,10 +408,7 @@ private function getWhereExpressionFromCriteriaField(
408408
string $entityClassName = null,
409409
int $aliasNumber = null,
410410
): CompositeExpression {
411-
$snakeField = u($field)
412-
->snake()
413-
->toString()
414-
;
411+
$snakeField = str_replace('.', '_', u($field) ->snake() ->toString());
415412
$parameter = ":{$snakeField}";
416413
$operator = '=';
417414
$prefixedField = $field;
@@ -476,10 +473,7 @@ private function getWhereExpressionFromCriteriaField(
476473
])]
477474
private function flattenOperand(QueryBuilder $queryBuilder, Operand $operand, string $field, mixed $value): array
478475
{
479-
$snakeField = u($field)
480-
->snake()
481-
->toString()
482-
;
476+
$snakeField = str_replace('.', '_', u($field) ->snake() ->toString());
483477
$parameter = ":{$snakeField}";
484478
$operator = $operand->getOperator();
485479

src/Bridge/Repository/NormalizerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function normalizeCriteria(
5353
$resolvedValue = $ignoreValidation
5454
? $value
5555
: $this->validateFieldValue($field, $value, $entityClassName);
56-
$output[$field] = (string) $this->serializer->normalize($resolvedValue);
56+
$output[$field] = $this->serializer->normalize($resolvedValue);
5757
}
5858
}
5959

0 commit comments

Comments
 (0)