Filter on subentity using AutoQuery

Hi,

i have a DTO with a IJoin to a subentity called BookingResourceRelation

public class BookingQuery : QueryDb<Booking, BookingQueryResponse>, IJoin<Booking, BookingResourceRelation>
{}

I want to filter on the BookingResourceRelation.Id properties.
How can i do that?

I have entered a request property like this

 [ApiMember(
       Description =
           "Query for specific Booked Resources, default is all resources",
       ParameterType = "query",
       IsRequired = false)]
    public int[] BookedResourceIds { get; set; }

Thx!

The property name needs to be prefixed with the name of the joined table and the field.

Hi Mythz,
i still cant get it to work.

I have done this
Joined the table

public class BookingQuery : QueryDb<Booking, BookingQueryResponse>, IJoin<Booking, BookingResourceRelation> 

Added a property

       [ApiMember(
    Description =
        "Query for specific Booked Resources, default is all resources",
    ParameterType = "query",
    IsRequired = false)]
    public int[] BookingResourceRelationResourceIds { get; set; }

And my subentity is called BookingResourceRelation and the property ResourceId

I call the service with this url querystring &BookingResourceRelationResourcesIds=1

But still i retrieve all records.

Can you see whats wrong?

Thx!

The Joined tables need to support reference conventions so the tables can be implicitly joined.

Otherwise I can’t tell what’s wrong with just these code fragments, can you provide the full source code for each of the classes as well as some test data so we’re able to test this locally.