You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i.e. you want to query Site Pages for anything that has been published straight away or scheduled time is less than now will throw an error:
System.NotSupportedException: Node of type Equal of expression ((c.Values.get_Item("OData__PublishStartDate") As Nullable`1) == null) is not supported
Steps to reproduce
this works:
var items = await myList.Items.Where(c =>
(c.Values["OData__PublishStartDate"] as DateTimeOffset?) <= now
).ToListAsync();
this does not:
var items = await myList.Items.Where(c =>
(c.Values["OData__PublishStartDate"] as DateTimeOffset?) <= now ||
(c.Values["OData__PublishStartDate"] as DateTimeOffset?) == null
).ToListAsync();
Expected behavior
the OData Query that is produced should be
OData__PublishStartDate le datetime'2024-09-15T05:18:54Z' or OData__PublishStartDate eq null
Category
Describe the bug
i.e. you want to query
Site Pages
for anything that has been published straight away or scheduled time is less than now will throw an error:Steps to reproduce
this works:
this does not:
Expected behavior
the OData Query that is produced should be
Environment details (development & target environment)
Additional context
In my opinion the problem is here:
pnpcore/src/sdk/PnP.Core/QueryModel/Query/DataModelQueryTranslator.cs
Line 216 in 3592355
I am not sure if null check should be performed on the value.
The text was updated successfully, but these errors were encountered: