Closed atrousb2 closed 3 years ago
Hello @atrousb2 ,
This issue happens if our library cannot discover that your table has some trigger, for example, if the user has not the right (Otherwise, it will automatically handle it).
If that's only this table, you can force it to use the right resolution this way:
DapperPlusManager.Entity<EntityWithTrigger>().UseBulkOptions(x =>
{
// all logic such as if our library had discovered trigger will be logic
x.ForceTriggerResolution = true;
});
// or
DapperPlusManager.Entity<EntityWithTrigger>().UseBulkOptions(x =>
{
// will force the output in a select, should not be needed if you already specified ForceTriggerResolution = true
x.ForceSelectOutput = true;
});
You can also enable it globally this way:
BulkOperationManager.BulkOperationBuilder = operation =>
{
operation.ForceTriggerResolution = true;
}
Let me know if that solution worked.
Best Regards,
Jon
@JonathanMagnan, yeah, it worked, thank you! :)
Awesome @atrousb2
Don't hesitate to contact us with any questions, issues or feedback!
Best regards,
Jon
Hi, guys!
In our current project, we use auditing functionality:
together with the
BulkMerge
method for creating and updating entities.The thing is once a trigger on a table is enabled, we got the following exception:
Can it be fixed? And is there a workaround for now?