-
Notifications
You must be signed in to change notification settings - Fork 588
Closed
Labels
Description
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)'
AllColumns = GetColumns().Select(c => new Column
{
Alias = c.Alias,
ClassMapper = c.ClassMapper,
Property = c.Property,
SimpleAlias = $"{Configuration.Dialect.ParameterPrefix}i_{i++}",
TableIdentity = c.TableIdentity,
Table = c.Table
}).ToList<IColumn>();
//AllColumns = GetColumns().ToList();
//AllColumns = AllColumns.Select(c => new Column
//{
// Alias = c.Alias,
// ClassMapper = c.ClassMapper,
// Property = c.Property,
// SimpleAlias = $"{Configuration.Dialect.ParameterPrefix}i_{i++}",
// TableIdentity = c.TableIdentity,
// Table = c.Table
//}).ToList<IColumn>();