delete method of spring data jpa

In the delete method of spring data jpa, all fields are null when updating, so when there are fields in the table that are not required to be empty, insert null will be reported to the fields that are not allowed to be empty.

At this time, only write the sql statement by himself, and his save automatically recognizes the update and insert

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326452309&siteId=291194637
Recommended