[CSHARP-606] LINQ Is predicate does not work for properties Created: 18/Oct/12  Updated: 20/Mar/14  Resolved: 04/Nov/12

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.5, 1.6
Fix Version/s: 1.7

Type: Bug Priority: Major - P3
Reporter: Andy Clapham Assignee: Craig Wilson
Resolution: Done Votes: 0
Labels: C#, Driver, Linq
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change

 Description   

The LINQ driver's type tests when used on a member property in a predicate do not include the member name.

e.g.

from t in collection.AsQueryable() where t.Prop is B select t

translates to

{ "_t" : "B" } 

instead of

{ "Prop._t" : "B" } 

A Similar problem exists for type comparisons using typeof.



 Comments   
Comment by auto [ 08/Nov/12 ]

Author:

{u'date': u'2012-11-04T01:17:03Z', u'email': u'craiggwilson@gmail.com', u'name': u'Craig Wilson'}

Message: CSHARP-606: added support for type discriminated queries on fields.
Branch: x2.0
https://github.com/mongodb/mongo-csharp-driver/commit/026b3959ff39656d47d37d4bc0fd544a830641c1

Comment by auto [ 08/Nov/12 ]

Author:

{u'date': u'2012-11-04T01:17:03Z', u'email': u'craiggwilson@gmail.com', u'name': u'Craig Wilson'}

Message: CSHARP-606: added support for type discriminated queries on fields.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/d9efe1d5a9f62e6389a88630cffbc9008cbebfb8

Comment by Craig Wilson [ 04/Nov/12 ]

In code review...

Generated at Wed Feb 07 21:37:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.