Release notes for re-motion version 1.13.158

List of Issues

New Features

Details

[RM-4939] Full support for ASP.NET medium trust

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


re-linq now runs with the standard ASP.NET medium trust permission set. (Some queries may still require additional permissions, though. Due to partial evaluations, queries may contain arbitrary code that demands arbitrary permissions.)

[RM-4482] Support covariant IQueryable<T> by allowing StreamedSequenceInfo's ItemExpression's type to be assignable to (rather than equal to) the enumerable item type

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


Currently, when a QueryModel expects a result type of IQueryable<T> (because the original queryable's Expression type is IQueryable<T>), re-linq based backends must take care to always provide item expressions (e.g., the items returned by the SelectClause) of type T as well. When they provide a type derived from T, an ArgumentTypeException is thrown by StreamedSequenceInfo's ctor (via QueryModel.GetOutputDataInfo()).

This is especially a problem with covariant queryables (.NET 4.0 and higher):

IQueryable<Abstract> abstractQueryable = CreateLinqQuery<Concrete>();
abstractQueryable.ToArray();

This query will cause an exception to be thrown because Concrete is not the same type as Abstract.

To enable this feature, change StreamedSequenceInfo to support the items produced by clauses and operators being more concrete than the expected query. This will require all code currently using StreamedSequenceInfo.ItemExpression.Type to use StreamedSequenceInfo.ResultItemType instead, otherwise they might generate invalid expression trees.