-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Given key was not present in the dictionary" after migration to 2.0 #8817
Comments
@Szmiglo I tried to repro this but have been unsuccessful so far. Would you be able to put together a small repro project for this? |
…ration to 2.0 Unable to repro so far, but it looks like there are some cases where the {_includedCollections.Keys} != {0.._includedCollections - 1} This change just removes that assumption during Dispose.
…ration to 2.0 Unable to repro so far, but it looks like there are some cases where {_includedCollections.Keys} != {0.._includedCollections.Count - 1} This change just removes that assumption during Dispose.
…ration to 2.0 Unable to repro so far, but it looks like there are some cases where {_includedCollections.Keys} != {0.._includedCollections.Count - 1} This change just removes that assumption during Dispose.
We made a mitigating fix that should prevent this issue. |
Can confirm this is affecting to me too with SqlServer, .NET Core, Windows 10. I haven't been able to test the fix in preview2 because of #9129 |
Will let you know as soon as I can migrate the code
…On Mon, Jul 10, 2017 at 10:27 AM Smit Patel ***@***.***> wrote:
@tinchou <https://github.com/tinchou> - Does this work for you now? Given
that #9129 <#9129> is
just new pattern.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8817 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABeg9IvOxZJ33FDuLTf3e8c3VeTpkvXxks5sMl8dgaJpZM4N2hSU>
.
|
Still seeing this error. The important part of the stack trace seems to be:
Similar to @Szmiglo, I have a complex query with multiple My csproj's EF dependencies are: <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0-preview2-final" /> |
@tinchou - This was fixed in 2.0 release and you would still hit exception in 2.0.0-preview2-final packages. |
But those aren't published on Nuget yet, right?
…On Fri, Jul 14, 2017, 10:20 AM Smit Patel ***@***.***> wrote:
@tinchou <https://github.com/tinchou> - This was fixed in 2.0 release and
you would still hit exception in 2.0.0-preview2-final packages.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8817 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABeg9HvTrhs_jTkBnXi8VdariI6cYnpKks5sN6NHgaJpZM4N2hSU>
.
|
That is correct. they are not in nuget yet but you could try nightly builds |
@anpete in 43e2ae1 you indicate that the conditions are unsure, and if you're interested I may have found one thing that causes it; if the loaded entities are missing the related entities loaded with @tinchou could you try making sure that all loaded entities have the specified related entities? |
@mrlund do you mean this? If I had only .Include(u => u.XXX).ThenInclude(i => i.YYY) Now I have .Include(u => u.XXX)
.Include(u => u.XXX).ThenInclude(i => i.YYY) If that's your suggestion, then it doesn't fix it. @smitpatel is there a nightly feed? are there instructions to set it up? |
im getting this error while installing a nuget package (autofixture). Any solutions on sight? |
@emanuelmarques This issue was fixed and released in 2.0.0. If you are still seeing a problem using the 2.0.0 release, then please open an new issue including complete details, versions used, and a code listing or project that reproduces what you are seeing. |
@ajcvickers the problem was with autofixture itself. it didnt support .netcore yet. The new RC does though |
Hello,
I have a problem with (pretty basic) selecting data with FirstOrDefaultAsync. The code was of course working on 1.1.0 of EFCore. I'm using PostgreSQL db provider. After migrating to 2.0.0-preview1-final I'm getting exception:
Code that selects data:
My model:
Please let me know if you want addidional info.
Interesting thing: when I'm using code below instead of previous one I'm getting Client object from db, but with null in Client.Offers.OfferProducts field (included by ThenInclude)
Further technical details
EF Core version: 2.0.0-preview1-final
Database Provider: Npgsql.EntityFrameworkCore.PostgreSQL (2.0.0-preview1)
Operating system: Windows 10 (1607)
IDE: Visual Studio 2017.3
The text was updated successfully, but these errors were encountered: