Skip to content

Instantly share code, notes, and snippets.



Last active Jun 14, 2020
What would you like to do?
@Table(name = AppTables.department)
public class Department {
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name =
private Long id;
@Column(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
You can’t perform that action at this time.