title: Spring Boot and Spring Data org.hibernate.exception.SQLGrammarException: could not extract ResultSet
body: <p>I've setup a new Spring Boot application using Spring Data. I'm trying to perform a really simple query on the database, but the error logs are reporting that there's something wrong with the query, and I can't figure out why.</p>
  
  <pre><code>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lines line0_' at line 1
  </code></pre>
  
  <p>The Database Table is setup as follows;</p>
  
  <h2>lines</h2>
  
  <p>BIGINT | id
  VARCHAR | name
  TEXT | storage_path
  TINYINT(1) | active</p>
  
  <p>The Line entity looks like this;</p>
  
  <pre><code>@Entity
  @Table(name="lines")
  public class Line {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      @Column(name="name")
      private String name;
  
      @Column(name="storage_path")
      private String storagePath;
  
      @Column(name="active", columnDefinition = "TINYINT(1)")
      private Boolean active;
      }
  </code></pre>
  
  <p>As I'm using Spring Data, my repository looks like this;</p>
  
  <pre><code>@Repository
  public interface LineRepository extends CrudRepository&lt;Line, Long&gt; {
  
      /**
       * Return a list of lines by their active value
       * @param active the active value
       * @return List of lines
       */
      public List&lt;Line&gt; getByActive(Boolean active);
  
  }
  </code></pre>
  
  <p>All I'm trying to do it call the findAll() method on the LineRepository, but it's raising the error above.</p>
  
  <p>EDIT: Below is the query being executed, I can't see anything wrong with it;</p>
  
  <pre><code>SELECT
          l 
      FROM
          Line l */ select
              line0_.id as id1_0_,
              line0_.active as active2_0_,
              line0_.name as name3_0_,
              line0_.storage_path as storage_4_0_ 
          from
              lines line0_
  </code></pre>