In my hibernate.cfg.xml file, if I use
<mapping package="x.y" />
that doesn't work with hbm2ddl, but if I use
<mapping class="x.y.Z" />
then it does work.
By "doesn't work" what happens is my output ddl sql file is empty.
I looked on the hibernate tools forum but didn't find anything except one entry
which made it sound like it's a classpath problem.
My pom contains
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>
annotationconfiguration
</implementation>
</component>
</components>
<componentProperties>
<configurationfile>
src/main/hbm/hibernate.cfg_postgres.xml
</configurationfile>
<format>true</format>
<!-- hbm2java -->
<jdk5>true</jdk5>
<!-- hbm2java, hbm2cfgxml -->
<ejb3>true</ejb3>
<!-- hbm2ddl -->
<export>true</export>
<update>false</update>
<drop>true</drop>
<create>true</create>
<format>true</format>
<outputfilename>ddl.sql</outputfilename>
<haltonerror>true</haltonerror>
</componentProperties>
</configuration>
</plugin>
Any suggestions as to how I can fix this so that I can use <mapping package=
instead of <mapping class= ?
Thanks.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email