UPDATE
Through my own trial and failure, I still solved the problem!) All because of inattention. In this code, which is presented below, nothing is relevant. The problem was that there were problems with the "ExClients" entity repository.
There is a method that saves an object of the ExClient class to the database. Here is the calling code:
public void removeClient(String client_login) { CurrentClients currentClients = ccRepository.findByClient(client_login); ExClients exClients = new ExClients(currentClients.getDoctor(), currentClients.getClient()); ecRepository.save(exClients); ccRepository.delete(currentClients); } Here is the object itself:
@Entity @Table(name = "ex_clients") public class ExClients { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Integer ID; @Column(nullable = false) private String doctor; @Column(nullable = false) private String client; public ExClients(){} public ExClients(String doctor, String client) { this.doctor = doctor; this.client = client; } // гетеры и сетеры } What is the problem?? How to solve? During the creation of the object, I even tried to score my own values, but still does not create anything. Although the code runs as ccRepository deletes the object.