Skip to content

[Known-Bug] Error is thrown when calling the 'UpdateAll' with dynamic entities (and the fields are not equals to the DB fields) and the 'qualifiers' were not defined. #232

@mikependon

Description

@mikependon
    [TestMethod]
    public void TestDbRepositoryUpdateAllViaDataEntitiesViaTableName()
    {
        // Setup
        var tables = Helper.CreateNonIdentityTables(10);

        using (var repository = new DbRepository<SqlConnection>(Database.ConnectionStringForRepoDb))
        {
            // Act
            repository.InsertAll(tables);

            // Act
            var items = tables.Select(item => new
            {
                // Set Values
                item.Id,
               /* item.ColumnDateTime,
                item.ColumnDateTime2,
                item.ColumnFloat,
                item.ColumnNVarChar,*/
                ColumnBit = false,
                ColumnInt = item.ColumnInt * 100,
                ColumnDecimal = item.ColumnDecimal * 100
            });

            // Update each
            var affectedRows = repository.UpdateAll(ClassMappedNameCache.Get<NonIdentityTable>(), items);

            // Assert
            Assert.AreEqual(tables.Count, affectedRows);
        }
    }

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdeployedFeature or bug is deployed at the current releaseknown-bugA known-bug that has been a part of the release.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions