title: Mapping multiple entities in the same package in hibernate.cfg.xml
body: <p>I want to ask if there are any ways I can map multiple entities in the same package easier in the hibernate.cfg.xml file.</p>
  
  <p>My hibernate.cfg.xml file looks like this:</p>
  
  <pre><code>&lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          .....
  
          &lt;mapping class="com.mypackage.entity.MyEntity1"/&gt;
          &lt;mapping class="com.mypackage.entity.MyEntity2"/&gt;
          &lt;mapping class="com.mypackage.entity.MyEntity3"/&gt;
          &lt;mapping class="com.mypackage.entity.MyEntity4"/&gt;
           .....
          &lt;mapping class="com.mypackage.entity.MyEntity20"/&gt;
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>Is there anyway I can specify that all the classes in the com.mypackage.entity package should all be mapped as entity?</p>
  
  <p>Many thanks</p>