<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : __NAME__
    Created on : __DATE__, __TIME__
    Author     : __USER__
    
    Description:
    Hibernate is the layer in your application which connects to this database, so it needs connection information. The connections are made through a JDBC 
    connection pool, which we also have to configure. We configure Hibernate's SessionFactory - a global factory responsible for a particular database. 
    If you have several databases, use several <session-factory> configurations, usually in several configuration files (for easier startup).
    
    The first four property elements contain the necessary configuration for the JDBC connection. The dialect property element specifies the particular SQL 
    variant Hibernate generates. The hbm2ddl.auto option turns on automatic generation of database schemas - directly into the database. This can of course 
    also be turned off (by removing the config option) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) 
    for persistent classes.

    Copy this file into the source directory, so it will end up in the root of the classpath. Hibernate automatically looks for a file called hibernate.cfg.xml 
    in the root of the classpath, on startup. 
    
-->

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

    <session-factory>

        <!-- Database connection settings -->
        <property name="connection.driver_class">org.postgresql.Driver</property>
        <property name="connection.url">jdbc:postgresql:databaseName</property>
        <property name="connection.username">postgres</property>
        <property name="connection.password">postgres</property>

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

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

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

        <!-- Drop and re-create the database schema on startup -->
        <!-- <property name="hbm2ddl.auto">create</property> -->

        <mapping resource="Mapping.hbm.xml"/>

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

