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.

Closed due to the fact that off-topic by Nofate member Jul 30 '16 at 13:37 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - Nofate
If the question can be reformulated according to the rules set out in the certificate , edit it .

    0