Last active
June 14, 2020 14:09
-
-
Save Hafiz-SE/ce4897bf5c077aa10d74ebd081d63fad to your computer and use it in GitHub Desktop.
This file contains 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 | |
@Table(name = AppTables.department) | |
public class Department { | |
@Id | |
@GeneratedValue(strategy = GenerationType.AUTO) | |
@Column(name = AppTables.departmentTable.id) | |
private Long id; | |
@Column(name = AppTables.departmentTable.name) | |
private String name; | |
@OneToOne(fetch = FetchType.EAGER) | |
@JoinColumn(name = AppTables.departmentTable.departmentHead) | |
private Employee departmentHead; | |
// Getters and setters are omitted for brevity | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment