# Querying from multiple tables and required mapping

**URL:** <https://discourse.hibernate.org/t/querying-from-multiple-tables-and-required-mapping/3682>\
**Category:** Hibernate ORM\
**Created:** [January 29, 2020, 4:50pm UTC](https://discourse.hibernate.org/t/querying-from-multiple-tables-and-required-mapping/3682 "2020-01-29T16:50:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bghayad](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@bghayad](https://discourse.hibernate.org/u/bghayad)\
**Post date:** [January 29, 2020, 4:50pm UTC](https://discourse.hibernate.org/t/querying-from-multiple-tables-and-required-mapping/3682/1 "2020-01-29T16:50:32Z")

</div>

Hello;

I am facing an error while using session.createquery when querying from multiple tables as it is giving me error that tables are not mapped. The problem that in configuration, I can add only one class in addannotation method, so how I can resolve the mapping problem for all the tables that I am selecting from them in my HQL query?

Regards  
Bilal
