title: Prevent no session fails in case of passing JPA repo methods
body: <p>What is the way to prevent the fail of <strong>no session</strong> using JPA repository in below case:</p>
  
  <p>I have a class called X with relation <code>@OneToMany</code> with <code>fetch = FetchType.LAZY</code>to class Y. I create the whole method in a repository, then I pass it to the Service class, and after that, I pass it to the Controller.</p>
  
  <p>While I want to get the object Y from class X by <code>x.getY()</code> which is related via <code>Lazy</code> fetchType I get an error (from Hibernate) called <strong>no session</strong>.</p>
  
  <p>How can I prevent this error from happening?</p>