-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Is your feature request related to a problem? Please describe.
I've implemented a custom SQLComparisonBuilder that extends the default one to provide SQL transformations for certain comparison operations. This works correctly for direct entity properties but not when filtering on joined/related entities.
For example, when filtering EntityA with a property from EntityB (where EntityB is a related entity), my custom builder isn't used for the entityB.property comparison.
Have you read the Contributing Guidelines?
Yes
Describe the solution you'd like
A way to apply custom SQL comparison builders to joined/related entity properties. Ideally, when a custom SQLComparisonBuilder is registered through the filterQueryBuilder option, it would be consistently used for any matching operation throughout the entire query, including those on related entities.
Describe alternatives you've considered
I've implemented an interceptor workaround that manually queries the related entity and transform the filter.
This works but requires interceptors for each relation where I need the custom comparison behavior.
Additional context
I'm using nestjs-query-typeorm with filterQueryBuilder: new CustomFilterQueryBuilder(repository) in my services.