Dapper-Extensions icon indicating copy to clipboard operation
Dapper-Extensions copied to clipboard

Fix so that Ignored properties are not included in parameters

Open balchen opened this issue 4 years ago • 2 comments

See #266 for details

balchen avatar Aug 09 '21 16:08 balchen

I saw your changes and they are working but to approve your PR you need to add tests for all the supported databases not only SQL Server.

The tests are using databases on docker and the docker compose file is in the project to help getting them up.

Please include tests for the other databases.

valfrid-ly avatar Aug 10 '21 18:08 valfrid-ly

Please include tests for the other databases.

Will do.

Before I commit, here's a rundown of how the unit tests worked.

I've started the different databases in Docker. StartDatabase.ps1 fails with "no such user" from wsl when I try to run it, so I had to use "docker compose up". StartDatabase.ps1 might not be ready yet, from the looks of it.

The setup scripts for SQL Server don't work out of the box if the "dapper" database doesn't already exist and Setup.sql needs to run. "USE dapper" fails because SQL Server executes every statement in the batch simultaneously, so CREATE DATABASE hasn't finished yet. Just so you know.

Otherwise SQL Server tests run fine. Oracle tests also run fine. So do Sqlite tests.

DB2 hangs indefinitely on connect. I don't have any other DB2 clients to test with, so I can't tell yet why it hangs.

MySQL/MariaDB fails with the below message and stack trace.

Is this normal?

Message: System.Collections.Generic.KeyNotFoundException : The given key '12545' was not present in the dictionary.

Stack Trace: Dictionary2.get_Item(TKey key) MySqlField.SetFieldEncoding() MySqlField.set_CharacterSetIndex(Int32 value) NativeDriver.GetColumnData(MySqlField field) NativeDriver.GetColumnsData(MySqlField[] columns) Driver.GetColumns(Int32 count) ResultSet.LoadColumns(Int32 numCols) ResultSet.ctor(Driver d, Int32 statementId, Int32 numCols) Driver.NextResult(Int32 statementId, Boolean force) MySqlDataReader.NextResult() MySqlDataReader.Close() MySqlDataReader.Dispose(Boolean disposing) MySqlDataReader.Dispose() MySqlCommand.ExecuteNonQuery() SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action2 paramReader) line 2813 SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) line 572 SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable1 commandTimeout, Nullable1 commandType) line 443 DatabaseTestsFixture.ExecuteScripts(IDbConnection connection, Boolean abortOnError, String[] scripts) line 120 MySqlBaseAsyncFixture.Setup() line 17

balchen avatar Aug 10 '21 23:08 balchen