Skip to content

Filtering on Nested Properties does not work with QueryParameter #7526

Description

@dlubitz

API Platform version(s) affected: 4.2.3

Description
Filtering on nested properties does not work, if I use QueryParameter to define the filter:

newGetCollection(
parameters: [
'street' => newQueryParameter(
filter: newPartialSearchFilter(),
property: 'address.street',
),
]
)

This results in a SQL error:

[Semantical Error] line 0, col 248 near 'street) LIKE': Error: Class App\\Entity\\Volunteer has no field or association named address.street

If I use the deprecated ApiFilter it works for me:

#[ApiFilter(SearchFilter::class, properties: ['address.street' => 'partial'])]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions