f1java

You should use the CascadeType.PERSIST or CascadeType.ALL in the section where you have used @OnetoMany or @ManytoOne example : @Entity @Table(name=”login”) public class Login { @Id @GeneratedValue(strategy=GenerationType.AUTO) private int id; private String username; private String password; private String role; public Login(){ } public int getId() { return id; } public void setId(int id) { this.id …

Continue reading object references an unsaved transient instance – save the transient instance