title: Spring Boot Mysql query to get all records based on the @query value
body: <p>I am trying to retreive all records from a MySQL table using spring boot JPA. Following is the repositry definition</p>
  
  <p>MovieRepository class</p>
  
  <pre><code>@Query("From MovieEntity m, TheaterMovieShowEntity tms, TheaterEntity t where t.city=?1 and t.theaterid=tms.theaterid and m.movieid=tms.movieid and t.seatsavailable&gt;=?2")
      List&lt;Movie&gt; getMoviesDetails(String cityName, int noOfTickets)throws MovieException;
  </code></pre>
  
  <p>MovieService Class</p>
  
  <pre><code>public List&lt;Movie&gt; getMoviesDetails(String cityName, int noOfTickets)throws MovieException{
          List&lt;Movie&gt;moviesIntheCityList = new ArrayList&lt;Movie&gt;();
          **moviesIntheCityList = (List&lt;Movie&gt;) movieRepository.getMoviesDetails(cityName, noOfTickets);**
          System.out.println("in the getMoviesDetails after querying"+moviesIntheCityList); // This is null
          return moviesIntheCityList;
      }
  </code></pre>
  
  <p>What am i missing?</p>