diff --git a/src/Bridge/Repository/AbstractEntityRepository.php b/src/Bridge/Repository/AbstractEntityRepository.php index 8070592..ae7d2e7 100644 --- a/src/Bridge/Repository/AbstractEntityRepository.php +++ b/src/Bridge/Repository/AbstractEntityRepository.php @@ -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 ( @@ -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 ( @@ -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; @@ -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(); diff --git a/src/Bridge/Repository/NormalizerTrait.php b/src/Bridge/Repository/NormalizerTrait.php index 7aac4ed..a847f0f 100644 --- a/src/Bridge/Repository/NormalizerTrait.php +++ b/src/Bridge/Repository/NormalizerTrait.php @@ -53,7 +53,7 @@ protected function normalizeCriteria( $resolvedValue = $ignoreValidation ? $value : $this->validateFieldValue($field, $value, $entityClassName); - $output[$field] = (string) $this->serializer->normalize($resolvedValue); + $output[$field] = $this->serializer->normalize($resolvedValue); } }