The Devart.Data.Linq.Queryable.LoadWith extension method does not behave correctly when there is a cached entity present in the data context
e.g.
var parentEntity = context.ParentEntities.FirstOrDefault();
var parentEntity2 = parentEntity.LoadWith(x => x.EntityAs)
.LoadWith(x => x.EntityBs).FirstOrDefault();
only association parentEntity2.EntityAs is populated, parentEntity2.EntityBs is empty
Using Devart LinqConnect for Metro (SQLite) v 4.4.463
Devart.Data.Linq.Queryable.LoadWith extension method
Re: Devart.Data.Linq.Queryable.LoadWith extension method
Thank you for the report on this. We have reproduced this issue. We will investigate it in more details and inform you about the results as soon as possible.
Re: Devart.Data.Linq.Queryable.LoadWith extension method
We have investigated this issue in more details. This behaviour can be reproduced only when trying to see the results of the "parentEntity2" object in Debug mode and this issue is related to the peculiarities of Metro style applications (this behaviour is not reproducible with a simple Console application and LinqConnect Professional). If you iterate these two collections, you will see that the data is obtained correctly.
For example:
We are sending you a sample project with the test database to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter. Please test it and tell us about the results.
For example:
Code: Select all
var values1 = parentEntity2.EntityAs.ToList();// the result is ok
var values2 = parentEntity2.EntityBs.ToList();// the result is ok, values2 is not empty