Database Stub Not working Using Specmatic #1036
-
I am encountering issues with two stubs in my project. Here are the details: Stub 1: idproof.json Error in process method 'The database returned no natively generated identity value'. Description: The table contains the primary key, which is also auto-incremented. However, despite this setup, the error persists. @query("select deletionFlag from NonServicePincodeList n where n.pincode = ?1") Stub 2: pincode1.json Error in process method 'For input string: "false"'. Description: The error indicates a problem with the data format. The input string "false" is causing the issue. uploadIdProofRepository.save(uploadIDProof); I've verified the stubs, and they seem correct. However, they are not functioning as expected. Any assistance in resolving these issues would be greatly appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@himanshuwadekar thanks for reaching out. I see two errors in the screenshots you have shared
|
Beta Was this translation helpful? Give feedback.
-
@himanshuwadekar About the For a table where the id is added as part of insert query the JSON would have looked as shown below.
The same query for an auto-increment based table setup will be updated as follows. Please note how the response needs to contain the generated key for id column.
|
Beta Was this translation helpful? Give feedback.
@himanshuwadekar About the
The database returned no natively generated identity value
that I mentioned above, the fix is now available as part ofspecmatic-jdbc
release0.11.2
. Example:For a table where the id is added as part of insert query the JSON would have looked as shown below.
The same query for an auto-increment based table setup will be updated as follows. Please note how the response needs to contain the generated key for id column.