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
Incorrect syntax near ','. #3691
Comments
Hey, There isn't enough of a code listing here for us to reproduce the issue. ~Rowan |
@rowanmiller Apologies about that. I updated the example. I had switched to some old lingo when I was adding the code here so my example had |
Thanks, can you share the model (entity classes and context) so that we can debug the issue |
@rowanmiller See the below code for my context and the two, respective entity classes. Thank you for taking time to look at this. I appreciate it.
|
@jasoncavett I've removed |
@AndriySvyryd Thanks. Just to be sure, you added N StoryPhotos, where N > 1? That's the only time I notice the issue. In any case, let me go back and try. I am using beta8, so perhaps I'll try to upgrade to RC1.
|
Okay, I am able to recreate the issue directly on my SQL database. Here is the query that is being generated.
And I get this error:
In addition, being able to find this, I Googled my original question a bit differently (when I first ran across this) and found this post on SO which included this answer:
So, it was my suspicion in my original post. This particular application is still running SQL Server 2005. This led me to find the database versions that EntityFramework.MicrosoftSqlServer support which is 2008 and greater. I think that answers the question and this can be closed! Thanks to both you for taking a look. @rowanmiller @AndriySvyryd |
@jasoncavett Thanks for digging into this. I don't expect us to change our decision to support only SQL Server 2008 and above, but it is good for us to understand what exactly doesn't work with previous versions. It seems that our INSERT batching strategy (using a single INSERT statement with multiple VALUES entries) is one of those. I believe if someone really needed to work with SQL Server 2005 they could create a different strategy that packs multiple INSERT statements in a single batch. This is something I think we could consider as a contribution. |
@divega Happy to help where I can! I did manage a workaround in the immediate, and, ultimately, this helped drive a decision to upgrade SQL Server. But, I may investigate the strategy that you suggested as I am sure I won't be the last person to run into this. If I come up with something, I'll look to contribute. |
I had this issue while using beta7, however, I still haven't been able to resolve with beta8, so I am posting here.
Here is the code that is breaking.
AddAsync
looks like:I call the above code (which is wrapped into a MVC endpoint that takes in a
StoryViewModel
). When I get toSaveChangesAsync
, I see the following exception.OSX El Capitan, Windows 8.1
The backend is SQL Server 2005. I am wondering if this may play into this at all.
The text was updated successfully, but these errors were encountered: