Wiki

Clone wiki

hibernate_issue / Home

Welcome

  • To reproduce the bug, please initially create the DB table
#!sql

CREATE TABLE `payment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `status` varchar(45) DEFAULT NULL,
  `last_update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
  • then open this project with your favorite IDE as a Spring Boot application
  • Start the application
  • perform the following POST request to create test entity in the DB:

localhost:8080/create_payment where localhost - name of the host where you run the app, 8080 - port number

#!json

{
    "status":"A"
}
  • ID of the created entity will be returned with response

  • Finally, execute the following GET request to reproduce the error

localhost:8080/reproduce_error?id=1 where 1 - ID which has been returned on a previous step.

Updated