Skip to content

Database Stub Not working Using Specmatic #1036

Discussion options

You must be logged in to vote

@himanshuwadekar About the The database returned no natively generated identity value that I mentioned above, the fix is now available as part of specmatic-jdbc release 0.11.2. Example:

For a table where the id is added as part of insert query the JSON would have looked as shown below.

{
  "query": "insert into product (cost,name,id) values (300,'Wooden Sofa',102)",
  "response": {
    "affectedRows": 1
  }
}

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.

{
  "query": "insert into product (cost,name,id) values (300,'Wooden Sofa',default)",
  "response": {
    "affectedRows":…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by himanshuwadekar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
2 participants