title: QueryDSL generates JPQL instead of SQL for SQLDialect
body: <p>Trying to get QueryDSL up for native SQL below is the Spring boot POM snippet</p>
  
  <pre><code>   &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.3.3.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;java.version&gt;1.7&lt;/java.version&gt;
          &lt;querydsl.version&gt;4.0.1&lt;/querydsl.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
              &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
              &lt;artifactId&gt;querydsl-sql&lt;/artifactId&gt;
              &lt;version&gt;${querydsl.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
              &lt;artifactId&gt;querydsl-sql-codegen&lt;/artifactId&gt;
              &lt;version&gt;${querydsl.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt; 
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
  
               .....
  
              &lt;plugin&gt;
                  &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
                  &lt;artifactId&gt;querydsl-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${querydsl.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;export&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;jdbcDriver&gt;org.hsqldb.jdbc.JDBCDriver&lt;/jdbcDriver&gt;
                      &lt;jdbcUrl&gt;jdbc:hsqldb:file:${project.basedir}/db/init;files_readonly=true&lt;/jdbcUrl&gt;
                      &lt;jdbcUser&gt;sa&lt;/jdbcUser&gt;
                      &lt;schemaPattern&gt;PUBLIC&lt;/schemaPattern&gt;
                      &lt;packageName&gt;com.example.domain&lt;/packageName&gt;
                      &lt;targetFolder&gt;${project.basedir}/src/generated/java&lt;/targetFolder&gt;
                  &lt;/configuration&gt;
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
                          &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
                          &lt;version&gt;2.2.4&lt;/version&gt;
                      &lt;/dependency&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
                          &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
                          &lt;version&gt;1.1.5&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  
  <p>The code for executing the query </p>
  
  <pre><code>void test() throws Exception {
      QCustomer customer = QCustomer.customer;
      System.out.println(dataSource.getConnection().getMetaData().getDatabaseProductName());
      SQLTemplates dialect = SQLTemplates.DEFAULT;
      SQLQuery query = new SQLQuery(dataSource.getConnection(), dialect);
      System.out.println(query.from(customer.count()).fetch());
  }
  </code></pre>
  
  <p>The execution results in SQLException as library generates JPQL(or HQL) instead of Native SQL</p>
  
  <pre><code>Exception in thread "main" com.querydsl.core.QueryException: Caught SQLSyntaxErrorException for 
  from count(CUSTOMER.ID)
      at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50)
      at com.querydsl.sql.Configuration.translate(Configuration.java:451)
      at com.querydsl.sql.AbstractSQLQuery.fetch(AbstractSQLQuery.java:399)
      at com.example.DemoApplication$Test.test(DemoApplication.java:55)
      at com.example.DemoApplication.main(DemoApplication.java:36)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
  Caused by: java.sql.SQLSyntaxErrorException: unexpected token: FROM
  </code></pre>