I have two different tables, Person table and Employee table. I need a one-to-one mapping between these two. Employee table's emp_id references Person table's person_id. I need some help in writing the mapping using annotations
persons.java
@OneToOne(mappedBy="persons1", cascade=CascadeType.ALL) public Employee getemployee() {
EMPLOYEE.JAVA
@ManyToOne @JoinColumn(name = "PERSON_ID")
@ManyToOne
? – JB Nizet