title: java.lang.IllegalStateException: No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode
body: <pre class="lang-java prettyprint-override"><code>session = sessionFactory.withOptions().tenantIdentifier(jndiName).openSession();
  String queryString = &quot;SELECT acm FROM Appointment ap JOIN AppointmentCouponMapping acm on acm.appointmentCouponMappingId = ap.appointmentCouponMappingId WHERE ap.appointmentId = :appointmentId and ap.organizationId = :organizationId&quot;;
  return (AppointmentCouponMapping) session.createQuery(queryString)
      .setLong(&quot;appointmentId&quot;, appointmentId)
      .setLong(&quot;organizationId&quot;, organizationId)
      .uniqueResult();
  </code></pre>
  <p>Error:</p>
  <pre><code>21:42:39,689 INFO  [stdout] (default task-3) java.lang.IllegalStateException: No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode 
  21:42:39,689 INFO  [stdout] (default task-3)  \-[IDENT] IdentNode: 'acm' {originalText=acm}
  21:42:39,689 INFO  [stdout] (default task-3) 
  </code></pre>