-
Notifications
You must be signed in to change notification settings - Fork 3.3k
EFCore 7.0 Bug - Invalid Operation Exception RE "Temporary Value" #29570
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
Comments
Hi @roji - Thank you so much for the reply. This looks like it may be the issue I'm experiencing, however, the suggested workaround does not alleviate it. I updated my "MapTable" method as demonstated below:
And I still get the error. I did some testing and started shrinking my batch sizes. I was even getting this error with batch sizes as low as 50! At 25 items per save, the error seems to go away. I'm happy to wait till 7.0.1 is released but I'd like to help determine if my issue is the same bug or a similar one. |
@TonyValenti can you please post the SQL sent by EF for the failing operation? Preferably before and after adding the HasTrigger configuration, to make sure it's properly taking effect. |
@roji - How should I collect the SQL? Is a SQL Profiler trace acceptable? Also, can you emailme? I'll send you the data that way. The trace may have sensitive information that I don't want to publish publicly. |
The preferred way to collect SQL is to turn on EF's logging and send that; be sure to send the SQL fragment which corresponds to the exception you're getting. My email is shown on my Github profile.
See #28768 for a discussion around this. |
@TonyValenti there's a very good chance that this is a duplicate of #29502, which is already fixed in our main branch. Can you please try daily build 8.0.0-alpha.1.22567.1 or above, and confirm whether this solves the problem for you? Instructions on installing daily builds is here. |
Hi @roji - Thanks for being patient with me while I test. |
Thanks for confirming! |
I am curious: |
@TonyValenti Because it's a duplicate of #29502 |
File a bug
Hi All,
I just upgraded my app to EF7.0 and I'm bumping into what I believe is new bug.
Related to my investigation, I've noticed a few things that either don't seem quite right or aren't quite what I would expect.
Here is my scenario. I am inserting:
long
namedRow
which is never set in my code.Here are some odd things I've noticed:
sp_executesql
commands.SET IMPLICIT_TRANSACTIONS OFF;SET NOCOUNT ON;
and some start with justSET NOCOUNT ON;
INSERT INTO
and othersMERGE
What should I do next in terms of troubleshooting this?
Something else I thought of:
@p1522
gets used everywhere a certain value comes into play. I suspect this would reduce network latency and the size of the SQL commands sent to SQL server.Include your code
I can't at this time.
Include stack traces
Include provider and version information
EF Core version: 7.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 7.0
Operating system: Win11
IDE: Visual Studio 2022 17.4
The text was updated successfully, but these errors were encountered: