Skip to content

Commit

Permalink
eager-vs-lazy: lazy fetch demo
Browse files Browse the repository at this point in the history
  • Loading branch information
chengcyber committed Aug 5, 2018
1 parent aeff7ec commit 50e1423
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Instructor {
@JoinColumn(name="instructor_detail_id")
private InstructorDetail instructorDetail;

@OneToMany(fetch = FetchType.EAGER, mappedBy = "instructor",
@OneToMany(fetch = FetchType.LAZY, mappedBy = "instructor",
cascade = { CascadeType.DETACH, CascadeType.REFRESH,
CascadeType.MERGE, CascadeType.PERSIST })
private List<Course> courses;
Expand Down

0 comments on commit 50e1423

Please sign in to comment.