Cannot perform distinct when selecting an anonymous type

Description

Attempting to execute a Linq query that selects out an anonymous type will result in a NotSupportedException being thrown. For example, performing the following query:

session.Query<Person>().Select(a => new { a.Name }).Distinct().ToArray();

will result in:

System.NotSupportedException : Expression type 10005 is not supported by this SelectClauseVisitor.

Environment

None

Attachments

1

Activity

Show:

Alex Zaytsev 
May 7, 2014 at 9:30 AM

Finally commited @ 12e861593bd0b24cf52838ce45179b2753e4bfac

John 
October 15, 2010 at 7:11 AM

Attached the test case

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created October 15, 2010 at 7:09 AM
Updated September 21, 2014 at 12:40 PM
Resolved May 7, 2014 at 9:30 AM
Who's Looking?

Flag notifications