UP | HOME

hibernate.cfg.xml

<?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>

    <!-- SQL dialect
    <property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>
     -->
    <property name="dialect">org.hibernate.dialect.HSQLDialect</property>

    <!-- Database connection settings
    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    <property
        name="connection.url">jdbc:mysql://localhost/test</property>
         -->
    <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
    <property
        name="connection.url">jdbc:hsqldb:/copybase/database/bookcase</property>
    <property name="connection.username">sa</property>
    <property name="connection.password"></property>
    <property name="connection.shutdown">true</property>
    <!-- Change this to update -->
    <property name="hibernate.hbm2ddl.auto">create</property>

    <!-- JDBC connection pool (use the built-in one) -->
    <property name="connection.pool_size">1</property>

    <!-- Enable Hibernate's automatic session context management -->
    <property name="current_session_context_class">thread</property>

    <!-- Disable the second-level cache  -->
    <property
     name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

    <!-- Echo all executed SQL to stdout -->
    <property name="show_sql">true</property>

    <!-- List all the mapping documents we're using -->
    <mapping resource="de/botzenhart/bookcase/data/Book.hbm.xml"/>
    <mapping resource="de/botzenhart/bookcase/data/Author.hbm.xml"/>
    <mapping resource="de/botzenhart/bookcase/data/Keyword.hbm.xml"/>

  </session-factory>
</hibernate-configuration>

Author: Rainer Schuler

Date: 2011-02-11 Fr

HTML generated by org-mode 7.4 in emacs 22