Closed isenmann closed 3 years ago
Hello @isenmann ,
Thank you for reporting,
We will look at it.
Best Regards,
Jon
Hello @isenmann ,
Just to let you know that we indeed found an issue in our library. We currently output the identity when we should not (this is an UPDATE
statement). We still investigate it, so I will provide a more detailed answer in a few days.
We hope that a fix will be available next Monday.
Best Regards,
Jon
Thanks for this fast reply! Just to let you know that this code works fine with an MS SQL Server, just as an information for you.
Do you have also some information about the exception with the BulkMerge command (which also works fine with a MS SQL Server)?
It will be all the same error we believe. I will have some soon.
Any news about the issue?
Hello @isenmann ,
Sorry for the delay, the change had a breaking change so we wanted to make sure before releasing a major version.
The v4.0.0 contains the fix for the BulkUpdate
and BulkMerge
.
Could you try it and let us know if now everything is working correctly?
Best Regards,
Jon
Hello @JonathanMagnan,
Thanks for the information. I will test it tomorrow (Thursday) and will give feedback then.
Cheers Daniel
Thanks @JonathanMagnan, the v4.0.0 fixes the mentioned problems!
I'm impressed by the very fast response and fix times of your product team!
Cheers Daniel
Awesome @isenmann !
Thank you for your kind words!
Don't hesitate to contact us with any questions or further assistance,
Jon
Hi,
we have a very strange behaviour again with DapperPlus and Npgsql. I will try to explain it here and I have also linked a repo to reproduce this issue.
How to reproduce:
If you now add a breakpoint in line 87 of IssueDemoController.cs before you execute step 6 and then execute step 6 you will see that the "insertOrUpdate" has 10 new properties to add and max. 10 properties which should be updated. If you have a look at the IDs of the properties which should be updated, they are now correct (in sync with the DB) before executing BulkUpdate. After BulkUpdate the IDs are altered to totally random one from the database and are not in sync with the ones from DB. The BulkUpdate does everything correct on DB, but the properties from the list which should be updated has the wrong IDs. Our problem is now that we use those IDs which are inside this list, it will be returned to the caller. Which now have totally wrong IDs to work on.
Another problem is that the BulkMerge operation which is commented in line 89 is not working. If you uncomment the BulkMerge and comment the BulkUpdate and BulkInsert you will see that the BulkMerge throws an exception. But that's another problem.
Hopefully you have some answers to the mentioned problems. Thanks in advance....
Cheers Daniel
https://github.com/isenmann/DapperPlus_IssueDemo
Versions I used: PostgreSQL 13.2, compiled by Visual C++ build 1914, 64-bit Npgsql.EntityFrameworkCore.PostgreSQL Version 5.0.2 DapperPlus 3.0.36 EntityFrameworkCore 5.0.3