Skip to content

Instantly share code, notes, and snippets.

@Hafiz-SE

Hafiz-SE/Employee.java

Last active Jun 14, 2020
Embed
What would you like to do?
test
@Entity
@Table(name = AppTables.employee)
public class Employee {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = AppTables.employeeTable.id)
private long id;
@Column(name = AppTables.employeeTable.name)
private String name;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = AppTables.employeeTable.department)
private Department department;
// 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.