Release notes for re-motion version 1.13.16

List of Issues

Bugfixes

Improvements

Refactoring

New Features

Details

[COMMONS-1366] Exception is thrown when Take is called with a non-constant (and non-evaluatable before parsing) expression

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


var query =
          from o in QueryFactory.CreateLinqQuery<Order>()
          where o.OrderNumber == 1
          from oi in o.OrderItems.Take (o.OrderNumber + 1)
          select oi;
      CheckQueryResult (query, DomainObjectIDs.OrderItem1, DomainObjectIDs.OrderItem2);

Change Take.Count to be an Expression.
Change Take.ExecuteInMemory to throw a NotSupportedException if Count is not a ConstantExpression. (We cannot support executing dependent subqueries in memory without knowing what the outer object values are.)

[COMMONS-1362] ReferenceReplacingExpressionTreeVisitor ignores the "ignoreUnmappedReferences" flag in subqueries

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


To resolve,

  • Change ReferenceReplacingExpressionTreeVisitor.VisitSubQueryExpression: Do not clone the subquery, use subQueryModel.TransformExpressions (ex => ReplaceReferences (ex, ...)) instead, pass the flag into the call.
  • Add CloningExpressionTreeVisitor, derive it from ReferenceReplacingExpressionTreeVisitor, override VisitSubQueryExpression with cloning logic (which is currently in VisitSubQueryExpression)
  • Change all Clone methods to use CloningExpressionTreeVisitor instead of ReferenceReplacingExpressionTreeVisitor

[COMMONS-1309] QueryModel.ResultType can get out of sync when a ResultOperator is added or the Selector is changed

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


Change ResultType property to GetResultType method.

To calculate the result type, start from the select clause, construct IQueryable<SelectorType>, then iterate over result operators, call "GetModifiedResultType (oldResultType)". Return result.

Requirements:

  • SelectClause.GetResultType()
  • ResultOperatorBase.GetModifiedResultType (oldResultType)

(Note: We assume that result type is always IQueryable<T> or a scalar value. This might change in the future if a feature request asks us to support "custom" queryable types.)

[COMMONS-1308] InvalidOperationException in SubQueryFlatteningVisitor - cannot replace reference

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


(no description)

[COMMONS-1310] Refactor QueryParser.ApplyAllNodes and MethodCallExpressionNodeBase.Apply: Move logic used for generating a new QueryModel to MainSourceExpressionNode.Apply

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


(no description)

[COMMONS-1117] split IntegrationTests to different files

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


(no description)

[COMMONS-1341] Refactor QuerySourceReferenceExpression to point to an interface rather than FromClauseBase

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


Add IQuerySource interface:

  • ItemType, ItemName properties
  • Implemented by FromClauseBase, JoinClause

Change QuerySourceReferenceExpression.ReferencedClause to be IQuerySourceClause
Change ClauseMapping to use IQuerySourceClause instead of IClause
Change Backend to throw an exception when ReferencedClause is no FromClauseBase (for now)

[COMMONS-1347] Support Queryable.GroupJoin

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


(no description)

[COMMONS-1357] QueryParser integration tests for GroupJoinClause

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Check ItemName, ItemType, references, etc.

[COMMONS-1356] Implement GroupJoinExpressionNode.Apply

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Create GroupJoinClause

[COMMONS-1355] Implement GroupJoinExpressionNode.GetResolved... and .Resolve methods

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


See JoinExpressionNode (COMMONS-1343)

[COMMONS-1353] Add GroupJoinClause, similar to JoinClause

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Similar to JoinClause, but additional InnerItemType, InnerItemName properties
ItemType is of type IEnumerable<?>, InnerItemType should be extracted via ParserUtility.GetEnumerableItemType in the constructor

[COMMONS-1351] Implement GroupJoinExpressionNode

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Implement GroupJoinExpressionNode : MethodCallExpressionNodeBase
Inner, OuterKeySelector, InnerKeySelector, ResultSelector
Parsing + Tests

[COMMONS-1340] Support Queryable.Join

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


(no description)

[COMMONS-1348] Implement JoinExpressionNode.Apply

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Create a JoinClause

[COMMONS-1346] QueryParser integration tests for JoinClause

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Check ItemName, ItemType, references, etc.

[COMMONS-1345] Refactor JoinClause - make it independent of FromClauseBase

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Implement IBodyClause
Remove FromClauseBase.JoinClause property
Adapt visitors
Clone method must add join clause to mapping (see FromClauseBase)

[COMMONS-1343] Implement JoinExpressionNode.GetResolved... and .Resolve methods

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


GetResolved... => Source.Resolve (...)
GetResolvedResultSelector => replace IEnumerable<TInner> parameter with QuerySourceReferenceExpression to this clause
Resolve => replace parameterToBeResolved with GetResolvedResultSelector()

[COMMONS-1342] Implement JoinExpressionNode

Component/s: Data.Linq
Issue Type: Sub-task
Resolution: Fixed
Status: Closed


Implement JoinExpressionNode : MethodCallExpressionNodeBase
Inner, OuterKeySelector, InnerKeySelector, ResultSelector
Parsing + Tests