Created
January 19, 2013 10:55
-
-
Save dagvadorj/4571998 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Employee extends Model implements Serializable { | |
private static final long serialVersionUID = 1L; | |
private String name; | |
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER) | |
private Employment employment; | |
public Employee() { | |
employment = new Employment(); | |
} | |
public String getName() { | |
return name; | |
} | |
public void setName(String name) { | |
this.name = name; | |
} | |
public Employment getEmployment() { | |
return employment; | |
} | |
public void setEmployment(Employment employment) { | |
this.employment = employment; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment