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.
My hibernate.cfg.xml file looks like this:
<hibernate-configuration>
<session-factory>
.....
<mapping class="com.mypackage.entity.MyEntity1"/>
<mapping class="com.mypackage.entity.MyEntity2"/>
<mapping class="com.mypackage.entity.MyEntity3"/>
<mapping class="com.mypackage.entity.MyEntity4"/>
.....
<mapping class="com.mypackage.entity.MyEntity20"/>
</session-factory>
</hibernate-configuration>
Is there anyway I can specify that all the classes in the com.mypackage.entity package should all be mapped as entity?
Many thanks