-
Notifications
You must be signed in to change notification settings - Fork 585
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
Insert error about multithreading #303
Comments
Except for changing AllColumns = GetColumns().ToList(); for AllColumns = GetColumns().Select(c => new Column I see no difference in your code that justifies any change in the key |
Well, I use a local variable 'allColumns' instead of AllColumns and a ConcurrentDictionary to keep the columns value.
The method 'DapperImplementor.GetSimpleAliasFromColumnAlias(string columnAlias)' will return the value of SimpleAlias. And if it is null or empty, the key of DynamicParameter will be the PropertyInfo.Name instead of SimpleAlias. I also change the method GetSimpleAliasFromColumnAlias. |
Would you be able to send a PR with your changes?? Please, don't forget to update the unit tests too. |
I have met the problem:
MySql.Data.MySqlClient.MySqlException:“Fatal error encountered during command execution.”
MySqlException: Parameter '@i_1' must be defined.
And I noticed the key of 'dynamicParameters.ParamInfo' isn't correct. some key values are @i_1, @i_2..., and some are the name of the Property, like FirstName, LastName.
So I modified part of the code of 'SqlGeneratorImpl' for myown and now it works fine.
Like this:
'SqlGeneratorImpl.Insert(IClassMapper classMapper)'
The text was updated successfully, but these errors were encountered: