Hibernate configuration - session factory scanning?

Posted by Marcus on Stack Overflow See other posts from Stack Overflow or by Marcus
Published on 2010-03-10T19:15:57Z Indexed on 2010/03/12 5:37 UTC
Read the original article Hit count: 229

Filed under:
|
|

We have this hibernate.cfg.xml file. Is there a way to tell Hibernate to just scan a directory instead of having to add an entry here for each class?

<hibernate-configuration>
   <session-factory>
      <mapping class="com.abc.domain.model.A" />
      <mapping class="com.abc.domain.model.B" />
      <mapping class="com.abc.domain.model.C" />
      <mapping class="com.abc.domain.model.D" />
      <mapping class="com.abc.domain.model.E" />
   </session-factory>
</hibernate-configuration>

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate