Hello there,
I have got a simple question, but I cant find a solution to it - I would like to include annotated classes (I have really a lot) into hibernate configuration by using some include command or smth ( e.g. XInclude? ), but I cant make my head how.
Something like this would make a lot of sense to me, but is not allowed though
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Enable Hibernate's automatic session context management -->
<property name="hibernate.dialect">
org.hibernate.dialect.DB2Dialect
</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<xi:include href="hibernate_annotated_classes.xml" xmlns:xi="http://www.w3.org/2003/XInclude" />
</session-factory>
</hibernate-configuration>
or smth like this would be nice too:
Code:
<mapping class="my.package.models.* />
I need to include it, cause I have a couple of hibernate configuration files, which I use to generate schema for a number of DBs and to have all the classes listed in each and every hibernate config file sounds like a very stupid idea.
Thnx for tips
--
Regards