Unable to cast object of type 'System.Reflection.RuntimePropertyInfo' to type 'System.Reflection.FieldInfo'
at Cassandra.Data.Linq.CqlExpressionVisitor.GetFieldValue(MemberExpression node)
at Cassandra.Data.Linq.CqlExpressionVisitor.GetPropertyValue(MemberExpression node)
at Cassandra.Data.Linq.CqlExpressionVisitor.GetClosureValue(MemberExpression node)
at Cassandra.Data.Linq.CqlExpressionVisitor.FillCondition(MemberExpression node, StringBuilder clause, List`1 parameters)
at Cassandra.Data.Linq.CqlExpressionVisitor.VisitBinary(BinaryExpression node)
at Cassandra.Data.Linq.CqlExpressionVisitor.VisitBinary(BinaryExpression node)
at System.Linq.Expressions.ExpressionVisitor.VisitLambda[T](Expression`1 node)
at Cassandra.Data.Linq.CqlExpressionVisitor.VisitMethodCall(MethodCallExpression node)
at Cassandra.Data.Linq.CqlExpressionVisitor.GetSelect(Expression expression, Object[]& values)
at Cassandra.Data.Linq.CqlQueryBase`1.<ExecuteAsync>d__35.MoveNext()
at Cassandra.Tasks.TaskHelper.WaitToComplete(Task task, Int32 timeout)
at Cassandra.Data.Linq.CqlQueryBase`1.Execute()
...
Exception appears in cases like
WHERE will throw exception. The problem is
and this code in CqlExpressionVisitor.cs (added in 3.3.0, commit 83dc9d831118233945c0071902dc8d6aaf24f24b)
DataStax Community Edition v3.0.9, Windows 7
Thank you for reply. We have a lot of usages of such kind so we'll be waiting for fix, but anyway thanks for advise.
This is a show-stopper for my company's use of the library - we upgraded to 3.3.1 today and very quickly reverted back to 3.2.1 due to this issue.
Thanks for letting us know , we will prioritize it accordingly.
I think I have a fix for this here: https://github.com/datastax/csharp-driver/pull/315
Merged!
Thanks .
FYI: We plan to simplify the ExpressionVisitor once is done.