Closed nothings-more closed 2 years ago
Helloo @nothings-more ,
The v4.0.21 has been released.
Could you try it and confirm us that everything is now working for the option UpdateMatchedAndConditionNames
?
Best Regards,
Jon
@JonathanMagnan , yes, looks like the issue is fixed in 4.0.21 Thank you
Hello, Yes, looks like the issue is fixed in 4.0.21 Thank you Best regards, Alex
Среда, 12 января 2022, 17:35 +03:00 от Jonathan Magnan @.***>: Helloo @nothings-more , The v4.0.21 has been released. Could you try it and confirm us that everything is now working for the option UpdateMatchedAndConditionNames? Best Regards, Jon — Reply to this email directly, view it on GitHub , or unsubscribe . Triage notifications on the go with GitHub Mobile for iOS or Android . You are receiving this because you were mentioned. Message ID: <zzzprojects/Dapper-Plus/issues/103/1011107759 @ github . com>
Hello,
I'm trying to extend bulk update operation using
UpdateMatchedAndConditionNames
, but looks like this setting is not affect resulting SQL generated for PostgreSql provider, while it works for SqlServer provider as expected.For example, consider having an entity with 2 properties:
Id
(key) andVersion
. Following codeproduces
MERGE
statement for SqlServer provider, with expected additional condition for "Version", i.e. in SqlServer bulk update will be performed only for those rows in DB where "Id" and "Version" are equal to corresponding properties of entity to update.For PostgreSql provider, though, the same C# code produces
UPDATE
with only "Id" comparison included inWHERE
clause, i.e. comparison of "Version" is ignored.I've sent a sample project with ability to test both providers to info@zzzprojects.com
Also, looks like there is a similar issue for
MergeMatchedAndConditionNames
property for bulk operationsPlease let me know if you need any additional info on the issue.
Thanks in advance, Alex