I am getting the above error could somebody help me understand why I am getting this error? I am using lombok annotations with hibernate.
@lombok.Getter
@lombok.Setter
@Entity
@lombok.NoArgsConstructor
public class PortfolioDetails {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private int yearsOfExperience;
@OneToMany
@JoinTable(name = "PORTFOLIO_EMPLOYMENT_DETAILS",
joinColumns = @JoinColumn(name = "PORTFOLIO_ID"),
inverseJoinColumns = @JoinColumn(name = "EMPLOYMENT_ID"))
private Set<EmploymentDetails> employmentDetails;
public PortfolioDetails(String name,int yearsOfExperience){
this.name= name;
this.yearsOfExperience =yearsOfExperience;
}
}
Below is the employmentDetails class for your reference. I have multiple classes like these. Thanks in advance for your help.
@lombok.Getter
@lombok.Setter
public class EmploymentDetails {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String jobTitle;
private String employmentType;
private String client;
private String employer;
//private LocalDate startDate;
//private LocalDate endDate;
private String location;
private String jobDescription;
private String jobDuties;
private String technologyStack;
public EmploymentDetails(
String jobTitle,
String employmentType,
String client,
String employer,
String location,
String jobDescription,
String jobDuties,
String technologyStack){
this.jobTitle =jobTitle;
this.employmentType = employmentType;
this.client = client;
this.employer = employer;
this.location = location;
this.jobDescription = jobDescription;
this.jobDuties = jobDuties;
this.technologyStack = technologyStack;
}
}