Noda Time 2.0 removed comparable operator support (>, <, etc.) on ZonedDateTime, forcing the developer to choose either ZonedDateTime.Comparer.Instant or ZonedDateTime.Comparer.Local instead.
Attempting to use these in a linq query or static index results in an InvalidOperationException. Need to teach Raven how to interpret these.
Both of the Can_Use_NodaTime_ZonedDateTime_In_Static_Index... tests are failing due to this.
Stack trace:
System.InvalidOperationException
Cannot understand how to translate Comparer.Instant.Compare(x.ZonedDateTime, value(Raven.Client.NodaTime.Tests.NodaZonedDateTimeTests+<>c__DisplayClass9_0).zdt)
at Raven.Client.Linq.LinqPathProvider.GetPath(Expression expression)
at Raven.Client.Linq.RavenQueryProviderProcessor`1.GetMemberDirect(Expression expression)
at Raven.Client.Linq.RavenQueryProviderProcessor`1.VisitLessThan(BinaryExpression expression)
at Raven.Client.Linq.RavenQueryProviderProcessor`1.VisitQueryableMethodCall(MethodCallExpression expression)
at Raven.Client.Linq.RavenQueryProviderProcessor`1.VisitQueryableMethodCall(MethodCallExpression expression)
at Raven.Client.Linq.RavenQueryProviderProcessor`1.GetDocumentQueryFor(Expression expression)
at Raven.Client.Linq.RavenQueryProviderProcessor`1.Execute(Expression expression)
at Raven.Client.Linq.RavenQueryInspector`1.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Raven.Client.NodaTime.Tests.NodaZonedDateTimeTests.Can_Use_NodaTime_ZonedDateTime_In_Static_Index(ZonedDateTime zdt) in D:\Dev\oss\RavenDB-NodaTime\test\Raven.Client.NodaTime.Tests\NodaZonedDateTimeTests.cs:line 175
at Raven.Client.NodaTime.Tests.NodaZonedDateTimeTests.Can_Use_NodaTime_ZonedDateTime_In_Static_Index_NearIsoMax() in D:\Dev\oss\RavenDB-NodaTime\test\Raven.Client.NodaTime.Tests\NodaZonedDateTimeTests.cs:line 147
Noda Time 2.0 removed comparable operator support (
>
,<
, etc.) onZonedDateTime
, forcing the developer to choose eitherZonedDateTime.Comparer.Instant
orZonedDateTime.Comparer.Local
instead.Attempting to use these in a linq query or static index results in an
InvalidOperationException
. Need to teach Raven how to interpret these.Both of the
Can_Use_NodaTime_ZonedDateTime_In_Static_Index...
tests are failing due to this.Stack trace: