This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Guys, We are trying to migrate from 3.0 to 3.11, but some of our unittest are failing with 3.11. var people = (from p in _uow.Current.People join j in _uow.Current.Jobs on p.JobId equals j.Id into jTMP from j in jTMP.DefaultIfEmpty() select new {Person = p, Job = j}).ToList() As expected (and as it was in 3.0) this results in an outer join. I will also include a sample project to illustrate the problem later. The sample project works with VS2010, MSUnitTest, SQLite Database I hope you can help me with this problem, because it is kind of blocking our migration to LS 3.11 Regards, Rolf
|
|
|
And here is the sample |
|
|
Thanks for the repro, we are having a look into a fix for this - I will post an update once we have some progress on this.
Jeremy |
|
|
Hey Jeremy, I collegue of mine reminded me that the solution I provided was wrong. It would be more correct to have a query that looks like SELECT Here the descriminator is included in the join This prevents from selecting joined Codes with CodeType IS NULL if they exist. An other question on this matter: Is it correct behaviour, when I add a "Not Job" in the JobId column to not return it? In 3.0 LS would raise a "can'not Materialize <FavoriteFood> Into <Job>" kind of error if i'm correct. |
|
|
Hi Rolf, We have included some updates in the latest nightly build which updates the behavior of this to include discriminator criteria in joins where applicable. This will now produce a statement of: SELECT for your earlier query rather than including the discriminator as extra criteria. Let us know how you get on, and thanks again for a concise sample for this :)
Jeremy |
|
|
Hi Jeremy, I retested the this bug with the following nightly: LightSpeed31Professional-20101112.msi and can confirm that the issue has been resolved as described in your post. Thanks for the help. Regards Rolf |
|