<?xml version="1.0"?>

<!DOCTYPE hibernate-configuration PUBLIC
  "-//Hibernate/Hibernate Configuration DTD 2.0//EN"
  "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
  <session-factory>
#set ( $dialects = $properties.load("hibernate/hibernate.dialect.properties") )
    <property name="dialect">$dialects.get($dbType)</property>
    <!-- set falase to hide debugging sql -->
    <property name="show_sql">false</property>

#foreach ( $entity in ${domain.getClasses().toList()} )
#set( $daoHibernatePath = ${stringUtils.getPackageAsPath(${entity.getPackage("dao.hibernate")})} )
#set( $mappingFileName = "${stringUtils.uncapitalize($entity.getName())}.hbm.xml" )
    <mapping resource="$daoHibernatePath/$mappingFileName"/>
#end
  </session-factory>
</hibernate-configuration>
