Querying a nested class field

Is it possible to query on a nested class field?

Example:

{
 Firstname: "Mr"
 Lastname: "Smith
 Address: {
   Street: "Rockstreet"
 }
}

I’ve tried using ?AddressStreetStartsWith=Rock but it doesn’t seem to work. Neither does ?Adresss.StreetStartsWith=Rock

No you can’t perform a server query on blobbed fields.

Hmm, but this isn’t a blob. This is just a referenced table?

So in sql it would be something like:

select t1.Firstname, t1.Lastname, t2.Street from Persons t1 join Address t2 on t1.AddressId = t2.Id where Street like 'Rock%'

Can’t tell what this is from your description, please include your AutoQuery DTO’s.

My real life example is a bit different but the same principle, given these DTOs

   [Alias("CompanyInformation")]
   public class Company
   {
      [Alias("CompanyName")]
      public string Name { get; set; }

      [Alias("CompanyDetails")]
      public string Details { get; set; }

      [Alias("CompanyEmail")]
      public string Email { get; set; }

      /* References */

      [IgnoreDataMember]
      [Alias("CompanyCategoryId")]
      public int CategoryId { get; set; }
      [Reference]
      public Category Category { get; set; }
   }

   [Alias("V_CompanyCategoriesUsed")]
   public class Category
   {
      [Alias("CompanyCategoryId")]
      public int Id { get; set; }

      private string _name;
      [Alias("CompanyCategoryName")]
      public string Name { get; set; }
   }

How would I AutoQuery for a category name? Say CategoryNameStartsWith=X?

Where’s the actual AutoQuery DTO? It needs a Join.

I had a join at first, but it seemed that I didn’t need one (or maybe thats whats missing now), but for retreiving data this was sufficient:

   [Route("/companies", Verbs = "GET")]
   public class FindCompanies : QueryBase<Company>
   {
...

You don’t need a IJoin to load references but you do need one to query a joined table.

maybe you can try this out. add AddressStreet to your request dto.

My apologies in advance for bumping such an old topic, but I’m a little frustrated by my inability to find an answer to this very question put forward by the OP.

The links provided in this topic by @mythz and @DannyKim both seem to be outdated, as there is no mention of joins in either link - I suspect the page linked has been updated since and the relevant information removed. I’m finding this a common theme in discovering how to use AutoQuery - I Google and find topics which link to pages which no longer have the relevant information.

Where do I find the documentation describing how to provide an AutoQuery which joins two tables together, and allows me to filter based on fields of the joined table?

Docs for joining tables in AutoQuery are now at: