org.springframework.orm.jpa.JpaSystemException: null id generated for:class oneToOne
As the title,I got the following exception when I try to save Datas using Spring Data jpa.Please help me out to solve this problem because I still couldn't solve though searching familiar problems. Class Activity: @Entity @Table(name = "activity") @Access(AccessType.FIELD) public class Activity implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String activityName; private String startTime; private String endTime; @OneToOne(fetch = FetchType.LAZY, mappedBy = "activity", cascade = CascadeType.ALL, optional = false) private ActivityContent
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.