<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory>
        <property name="connection.url">jdbc:postgresql://localhost:5432/testHibernate</property>
        <property name="connection.driver_class">org.postgresql.Driver</property>
        <property name="dialect">org.hibernate.dialect.PostgreSQL82Dialect</property>
        <property name="connection.username">postgres</property>
        <property name="connection.password">postgres</property>

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

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

        <!--MAPPING BY ANNOTATION -->
        <mapping class="my.mvc.models.User"/>
        <mapping class="my.mvc.models.Item"/>
        <mapping class="my.mvc.models.FileImage"/>
        <mapping class="my.mvc.models.Car"/>
        <mapping class="my.mvc.models.parts.Transmission"/>
        <mapping class="my.mvc.models.parts.Engine"/>
        <mapping class="my.mvc.models.parts.GearBox"/>
    </session-factory>
</hibernate-configuration>