Skip to content

Instantly share code, notes, and snippets.

@theresajayne
Created October 12, 2011 11:54
Show Gist options
  • Select an option

  • Save theresajayne/1281031 to your computer and use it in GitHub Desktop.

Select an option

Save theresajayne/1281031 to your computer and use it in GitHub Desktop.
<?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>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<!-- Enable the second-level cache -->
<!-- <property name="cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</property>
<property name="net.sf.ehcache.configurationResourceName">uk.co.inbrand/hibernate/ehcache.xml</property>
<property name="cache.use_query_cache">false</property> -->
<!--
When an HQL statement declares a true/false, replace with the inbrand standard Y/N
-->
<property name="hibernate.query.substitutions">true 'Y', false 'N'</property>
<!-- A useful property do debugging queries. Besure sure it is false or commented out when going PROD -->
<!--
<property name="hibernate.show_sql">true</property>
-->
<!-- Format the printed out SQL generated by Hibernate -->
<property name="hibernate.format_sql">false</property>
<!-- If enabled, Hibernate will collect statistics useful for performance tuning - JMX -->
<property name="hibernate.generate_statistics">false</property>
<!-- Second-level cache -->
<!-- <property name="hibernate.cache.use_second_level_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</property> -->
<!-- Forces Hibernate to store data in the second-level cache in a more human-friendly format. -->
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- <property name="hibernate.cache.use_structured_entries">false</property> -->
<mapping class="uk.co.inbrand.model.Address"/>
<mapping class="uk.co.inbrand.model.Chapter"/>
<mapping class="uk.co.inbrand.model.Document"/>
<mapping class="uk.co.inbrand.model.ObjectRepository"/>
<mapping class="uk.co.inbrand.model.Licences"/>
<mapping class="uk.co.inbrand.model.Objects"/>
<mapping class="uk.co.inbrand.model.Order"/>
<mapping class="uk.co.inbrand.model.Organisation"/>
<mapping class="uk.co.inbrand.model.PageStyle"/>
<mapping class="uk.co.inbrand.model.Templates"/>
<mapping class="uk.co.inbrand.model.Users"/>
<mapping class="uk.co.inbrand.model.Cache"/>
<mapping class="uk.co.inbrand.model.Folders"/>
<mapping class="uk.co.inbrand.model.ObjectType"/>
<mapping class="uk.co.inbrand.model.Authority"/>
<mapping class="uk.co.inbrand.model.IndexQueue"/>
<mapping class="uk.co.inbrand.model.Structure"/>
</session-factory>
</hibernate-configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment