Release notes for re-motion version 1.13.115

List of Issues

Bugfixes

Breaking Changes

Details

[RM-4188] The non-generic QueryProviderBase.Execute method throws a TargetInvocationException with an inner InvalidCastException when a query returns a specific type of queryable or enumerable

Component/s: Data.Linq
Issue Type: Bug
Resolution: Fixed
Status: Closed


The following query throws this exception:

IQueryable nonGenericQueryable = new MyQueryable<Cook>();
foreach (var item in nonGenericQueryable)
  ;

This causes the non-generic QueryableBase.GetEnumerator() to be called, which in turn invokes the non-generic QueryProviderBase.Execute (Expression) method. That method gets the expected result type from the Expression tree and tries to cast the result to that type. Which does not succeed as the result of Execute is not of type MyQueryable<Cook> (but EnumerableQuery<Cook>).

See also: http://groups.google.com/group/re-motion-users/browse_thread/thread/ed448a3a4dcbfa36.

[RM-4189] QueryProviderBase.Execute<TResult> is no longer virtual

Component/s: Data.Linq
Issue Type: Breaking Change
Resolution: Fixed
Status: Closed


Override the new public virtual IStreamedData Execute (Expression expression) method instead.

This change was made for performance, to avoid one reflection-based call.