title: Exception while reading data from JPA - org.hibernate.LazyInitializationException
body: <p>I have a 2 entity classes.Employee and Account</p>
  
  <pre><code>@Data
  @NoArgsConstructor
  @AllArgsConstructor
  @Entity
  @DynamicUpdate
  @DynamicInsert
  @Table(name = "employee", schema = "org")
  public class Employee {
  @Id
  @Column(name = "emp_id")
  private String empId;
  
  @Column(name = "emp_name")
  private String empName;
  
  @OneToMany(cascade = CascadeType.ALL, mappedBy = "employee")
  private Set&lt;Account&gt; accounts;
  }
  
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  @Entity
  @DynamicUpdate
  @DynamicInsert
  @Table(name = "account", schema = "org")
  public class Account {
  
  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  @Column(name = "acct_id")
  private Integer accountId;
  
  @Column(name = "acct_nbr")
  private String accountNumber;
  
  @ManyToOne
  @JoinColumn(name = "emp_id", nullable = false)
  private Employee employee;
  }
  </code></pre>
  
  <p>I am able to save data to database , however upon retrieval of employee row I get "<strong>Method threw 'org.hibernate.LazyInitializationException' exception. Cannot evaluate Employee.toString()</strong>" and for the collections in the employee object(accounts) I see "<strong>Unable to evaluate the expression Method threw org.hibernate.LazyInitializationException' exception.</strong>"</p>
  
  <p>I have tried with FetchType.EAGER for OnetoMany however no luck.Not sure if its the lombok @Data(toString())causing issue.</p>
  
  <p>PS: I use JPA CrudRepository to save and retrieve data from DB.</p>
  
  <p>please help.</p>