Skip to content

Instantly share code, notes, and snippets.

@Hafiz-SE
Last active June 14, 2020 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hafiz-SE/7755a7f86e4152016028a87bc72e18db to your computer and use it in GitHub Desktop.
Save Hafiz-SE/7755a7f86e4152016028a87bc72e18db to your computer and use it in GitHub Desktop.
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