title: Intellij how to correctly configure hql with spring boot. Now i get Persistence QL Queries are error-checked
body: <p>So i was trying to use a custom query using hibernate and jpa </p>
  
  <pre><code>@Transactional
  public interface EstimateOptionsDao extends JpaRepository&lt;EstimateOptions, Integer&gt; {
  
      @Query("from estimateOptions options inner join options.company company inner join company.user user where user.name = :userName\n")
      EstimateOptions EstimateOptions(String userName);
  
  }
  </code></pre>
  
  <p>But the <code>EstimateOptions</code> gives me the following error:</p>
  
  <pre><code>Can't resolve symbol 'EstimateOptions' less... (Ctrl+F1) 
  This inspection controls whether the Persistence QL Queries are error-checked
  </code></pre>
  
  <p>So i found this post <a href="https://stackoverflow.com/questions/2188186/why-does-hibernate-query-have-compile-error-in-intellij">Why does Hibernate query have compile error in IntelliJ?</a>.</p>
  
  <p>So i added a facet to test this:</p>
  
  <p>Now i have hibernate.cfg.xml like this:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC
      "-//Hibernate/Hibernate Configuration DTD//EN"
      "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
    &lt;session-factory&gt;
      &lt;property name="connection.url"/&gt;
      &lt;property name="connection.driver_class"/&gt;
      &lt;property name="connection.username"/&gt;
      &lt;property name="connection.password"/&gt;
      &lt;!-- DB schema will be updated if needed --&gt;
      &lt;!-- &lt;property name="hbm2ddl.auto"&gt;update&lt;/property&gt; --&gt;
    &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>And spring configuration like this :</p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://localhost:3306/testdb
  spring.datasource.username=root
  spring.datasource.password=root
  spring.datasource.driverClassName=com.mysql.jdbc.Driver
  spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
  spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
  </code></pre>
  
  <p>But if i got to the Persistence Tool in intellij en do a simple query like this:</p>
  
  <p>hql> From user</p>
  
  <p>it produce the following error:</p>
  
  <pre><code>[2015-12-09 12:59:27] org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class []
  [2015-12-09 12:59:27] java.lang.ClassNotFoundException: 
  .....
  </code></pre>
  
  <p>As you can see i'm a bit lost... What is wrong with these settings ?</p>