IPageRetriever where condition for unpublished changes

James de Boer asked on February 24, 2025 17:54

When using IPageRetriever it appears that a where condition is only taken into account on the published versions of a page, is that the expected behaviour?

var nodes = _pageRetriever.Retrieve(query => query .WhereEquals("AField", aValue) .WhereGreaterOrEquals(nameof(Event.ListingStartDate), DateTime.Now) .LatestVersion(true) .Published(false)) .ToList();

is not picking up nodes where the unpublished version of AField is set to aValue.

Is the only option to get back all nodes and then filter in code?

Thanks

   Please, sign in to be able to submit a new answer.