Release notes for re-motion version 1.13.23

List of Issues

Bugfixes

Improvements

New Features

Details

[COMMONS-1573] ArgumentException in StreamedSingleValueInfo at delegate creation for ExecuteSingleQueryModel

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


It may be something that I'm doing wrong and I'm still investigating, but just incase it's something simple I thought I'd send a quick mail - I've got several tests that are throwing ArgumentExceptions from StreamedSingleValueInfo.ExecuteQueryModel, at the point that it tries to create the delegate into the generic method. An example of a query that's failing is:

decimal? q = db.Products.Select(p => p.UnitPrice).Min();

I'll carry on looking here, but if there's any light you can shed on it, that would be great.

Update on the ArgumentException that I was getting. Looks like a bug in StreamedSingleValueInfo.cs - currently, the generic method is defined as:

public T ExecuteSingleQueryModel<T> (QueryModel queryModel, IQueryExecutor executor)
    {
....
    }

with the delegate creation being:

var func = (Func<QueryModel, IQueryExecutor, object>)
          Delegate.CreateDelegate (typeof (Func<QueryModel, IQueryExecutor, object>), this, executeMethod);

I think the method needs to be changed to:

public object ExecuteSingleQueryModel<T> (QueryModel queryModel, IQueryExecutor executor)
    {
....
    }

I've done this locally, and it's working better now. Not sure quite why it's taken me so long to spot the mismatch in the prototypes; I blame the painkillers that I'm on at the moment

[COMMONS-1574] BREAK: Remove AverageResultOperator.ResultType, calculate type from input sequence

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


(no description)

[COMMONS-1586] Provide a QueryModel method to identify Identity queries

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


Bonus: update ToString() such that it writes

{ [x] }

instead of

{ from <generated> in [x] select <generated }

and

{ ([x]).Count() }

instead of

{ (from <generated> in [x] select <generated).Count() }

(assuming ResultOperator syntax from COMMONS-1585)

[COMMONS-1558] Enable registration of methods defined in generic types

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


(no description)

[COMMONS-1557] Support parsing of Count properties for the common collection types/interfaces

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


Change CountExpressionNode to support the get_Count methods as well as Enumerable/Queryable's Count methods

[COMMONS-1556] Support parsing of MemberExpressions and ArrayLengthExpressions in the query method call chain

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


Idea: In ExpressionTreeParser, recognize MemberExpressions that refer to properties. Build an equivalent MethodCallExpression using the getter method, then apply the MethodCallExpressionParser. If this does not succeed, parse the MemberExpression as usual.

Also adjust SubQueryFindingVisitor accordingly.