Release notes for re-motion version 1.13.135

List of Issues

Bugfixes

Details

[RM-4564] When applying multiple FetchOne/FetchMany request for the same relation member to a query, those are not collapsed into one

Component/s: Data.Linq Data.Linq for re-store
Issue Type: Bug
Resolution: Fixed
Status: Closed


re-linq's fetch request mechanism should allow one to make multiple eager fetch calls for a nested relation member by repeating the fetch specification for the nested relation members:

(from o in Orders
 where o.OrderNumber == 1
 select o)
.FetchOne (o => o.Customer).ThenFetchMany (c => c.Orders)
.FetchOne (o => o.Customer).ThenFetchOne (c => c.Ceo)

In this example, re-linq should collapse the two fetch requests for o.Customer into one, with two inner fetch requests for c.Orders and c.Ceo.

However, while support for this feature is implemented for the ThenFetch... level, it doesn't work on the outer Fetch... level, and re-linq will store two separate fetch requests for o.Customer.

(With re-store's LINQ provider, this will throw an exception: System.InvalidOperationException : There is already an eager fetch query for relation end point 'Remotion.Data.UnitTests.DomainObjects.TestDomain.Order.Customer'.)