From 5370cf30b48bdf32ccaa85ed2c5853de4908219f Mon Sep 17 00:00:00 2001 From: WHLukasz Date: Thu, 26 Oct 2023 16:48:43 +0200 Subject: [PATCH 1/3] add note for filtering by hydrated data --- docs/API/content-type/listing-co.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/API/content-type/listing-co.md b/docs/API/content-type/listing-co.md index a6887cc5..f3c0978e 100644 --- a/docs/API/content-type/listing-co.md +++ b/docs/API/content-type/listing-co.md @@ -557,6 +557,10 @@ You have to care about encoding url params. For example: Only `contains` and `notContains` type filters can be used with filtering by relation. +!!! Note + Even if you list your content objects with hydration enabled, you cannot filter them by the hydrated data. + For example if a Content Type "Blog Post" has relation to another type "Author", and you want to filter by `Author.name`, and use `hydrate=1` param to get authors data embedded in blog posts data, you still have to use filtering by dataUrl method described above. + ### Hydrating objects If you wish to receive underlying objects attached to the object you are retrieving, you need to send a request with query parameter `hydrate` set to `1`, if hydrated objects have other objects attached that you want to get access to, you can set `hydrate` to `2`. From 6b4dc2d89ae41d919b82af135de73a2a99d51363 Mon Sep 17 00:00:00 2001 From: WHLukasz Date: Thu, 26 Oct 2023 16:49:37 +0200 Subject: [PATCH 2/3] add newline --- docs/API/content-type/listing-co.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/API/content-type/listing-co.md b/docs/API/content-type/listing-co.md index f3c0978e..cdf791bf 100644 --- a/docs/API/content-type/listing-co.md +++ b/docs/API/content-type/listing-co.md @@ -559,6 +559,7 @@ Only `contains` and `notContains` type filters can be used with filtering by rel !!! Note Even if you list your content objects with hydration enabled, you cannot filter them by the hydrated data. + For example if a Content Type "Blog Post" has relation to another type "Author", and you want to filter by `Author.name`, and use `hydrate=1` param to get authors data embedded in blog posts data, you still have to use filtering by dataUrl method described above. ### Hydrating objects From d857a806e81cd9cb61b6d3fba2069a5829f5c1ae Mon Sep 17 00:00:00 2001 From: WHLukasz Date: Thu, 26 Oct 2023 16:51:38 +0200 Subject: [PATCH 3/3] minor changes --- docs/API/content-type/listing-co.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API/content-type/listing-co.md b/docs/API/content-type/listing-co.md index cdf791bf..c8257efd 100644 --- a/docs/API/content-type/listing-co.md +++ b/docs/API/content-type/listing-co.md @@ -558,8 +558,8 @@ You have to care about encoding url params. For example: Only `contains` and `notContains` type filters can be used with filtering by relation. !!! Note - Even if you list your content objects with hydration enabled, you cannot filter them by the hydrated data. - + Even if you list your content objects with hydration enabled, you cannot filter them by the hydrated data. + For example if a Content Type "Blog Post" has relation to another type "Author", and you want to filter by `Author.name`, and use `hydrate=1` param to get authors data embedded in blog posts data, you still have to use filtering by dataUrl method described above. ### Hydrating objects