Skip to content

BulkUpdate is case insensitive #641

Closed

Description

@yanzubenyan

In batch update, the original value of the field is D18, L=1600. In this case, changing L to l will not update

Activity

  1. borisdj commented on Oct 8, 2021

    @borisdj
    Owner

    What Db are you using, I've tested it with both SqlServer and works fine.
    Generated Sql:

    UPDATE i SET [Description] = N'D18, l=1600'
    FROM [Item] AS [i]
    WHERE [i].[ItemId] <= 500

    Maybe you Db is case insensitive or something.
    Anyway if you can write a test where it would be reproducible.

  2. yanzubenyan commented on Oct 8, 2021

    @yanzubenyan
    Author

    image
    image

  3. yanzubenyan commented on Oct 8, 2021

    @yanzubenyan
    Author

    Just like in the picture, my l update to the sqlserver database is still L

  4. borisdj commented on Oct 8, 2021

    @borisdj
    Owner

    I see the issue is actually BulkUpdate and not BatchUpdate, but still I'm not able to reproduce it.

  5. yanzubenyan commented on Oct 8, 2021

    @yanzubenyan
    Author
  6. borisdj commented on Oct 8, 2021

    @borisdj
    Owner

    Quite peculiar issue.
    BulkUpdate uses MERGE that has EXISTS to skip updating same rows, but in this case seems that sql comparison L to l is same, probably because of collation: 'Chinese_PRC_CI_AS'.
    With BulkConfig OmitClauseExistsExcept it can be turned of, just call it like this:
    await _baseBomDetailRep.Context.BulkUpdateAsync(bulckall, new BulkConfig { OmitClauseExistsExcept = true });

  7. yanzubenyan commented on Oct 8, 2021

    @yanzubenyan
    Author

    thank you for your answer

  8. changed the title [-]Batch update is case insensitive[/-] [+]BulkUpdate is case insensitive[/+] on Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions