title: The Keycloak EntityManager can't mapping any model
body: <p>Keyсloak version 14.0</p>
  <p>I have store some custom tables in The Keycloak postgres database, my entity:</p>
  <pre><code>public class StoreTestModel {
  
      public StoreTestModel() {
      }
  
      public StoreTestModel(Integer id, String fieldOne, String fieldTwo) {
          this.id = id;
          this.fieldOne = fieldOne;
          this.fieldTwo = fieldTwo;
      }
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(updatable = false, nullable = false)
      private Integer id;
  
      @Column(name = &quot;field_one&quot;)
      private String fieldOne;
  
      @Column(name = &quot;field_two&quot;)
      private String fieldTwo;
  
      public Integer getId() {
          return id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      public String getFieldOne() {
          return fieldOne;
      }
  
      public void setFieldOne(String fieldOne) {
          this.fieldOne = fieldOne;
      }
  
      public String getFieldTwo() {
          return fieldTwo;
      }
  
      public void setFieldTwo(String fieldTwo) {
          this.fieldTwo = fieldTwo;
      }
  }
  </code></pre>
  <p>When i try to get this data by the EntityManager firts of all I have receive the EntityManager:</p>
  <pre><code>EntityManager em = jpaConnectionProvider.getEntityManager();
  </code></pre>
  <p>Then I try to get the data from my custom table:</p>
  <pre><code>StoreTestModel storeTestModel = em.createQuery(&quot;SELECT u FROM store_test_model u WHERE u.fieldOne = :fieldOne&quot;, StoreTestModel.class).setParameter(&quot;fieldOne&quot;, &quot;test one&quot;).getSingleResult();
  </code></pre>
  <p>my persistence.xml :</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;persistence version=&quot;2.0&quot;
               xmlns=&quot;http://java.sun.com/xml/ns/persistence&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
               xsi:schemaLocation=&quot;
          http://java.sun.com/xml/ns/persistence
          http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd&quot;&gt;
      &lt;persistence-unit name=&quot;api-extensions&quot;&gt;
          &lt;jta-data-source&gt;java:jboss/datasources/KeycloakDS&lt;/jta-data-source&gt;
  
          &lt;class&gt;keycloak.apiextension.entity.StoreTestModel&lt;/class&gt;
  
          &lt;properties&gt;
              &lt;property name=&quot;hibernate.hbm2ddl.auto&quot; value=&quot;none&quot; /&gt;
              &lt;property name=&quot;hibernate.show_sql&quot; value=&quot;false&quot; /&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  <p>but i recive the exception:</p>
  <p><code>ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-611) Uncaught server error: org.keycloak.models.ModelException: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: store_test_model is not mapped [SELECT u FROM store_test_model u WHERE u.fieldOne = :fieldOne]</code></p>
  <p>plese, help me to solve this issue </p>