Error getting generated keys after insert #2550
Labels
Under Investigation
Used for issues under investigation
Waiting for Response
Waiting for a reply from the original poster, or affiliated party
Driver version
12.8.1.jre11
SQL Server version
Client Operating System
Linux (Ubuntu 22.04.3 LTS)
JAVA/JVM version
java-1.21.0-openjdk-amd64
Table schema
Problem description
Afterperforming an
INSERT
opertaiont, the call togetGeneratedKeys
throws an exception when there is a trigger on the table where the insert is made. Take for instance the following code snippet:Expected behavior
The record is correctly inserted, the generated keys are returned and no exception is thrown.
Actual behavior
The driver throws an exception and fails to return the generated keys.
The record is correctly inserted.
Error message/stack trace
Any other details that can be helpful
If the insert statement has more than one value, the result is the same and the update count is returned as 1 also. This also seems wrong, because all the records are inserted.
JDBC trace logs
The text was updated successfully, but these errors were encountered: