HIBERNATE TUTORIAL

HIBERNATE - Getting Started With Hibernate

Hibernate Configuration File

Hibernate configuration file information needed to connect to persistent layer and the linked mapping documents. You can either specify the data source name or JDBC details that are required for hibernate to make JDBC connection to the database. The element <mapping-resource> refers to the mapping document that contains mapping for domain object and hibernate mapping document.

<!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="show_sql">true</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLMyISAMDialect</property>
<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/applabs</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">r00Tp@$wd</property>

<mapping resource="org/applabs/hibernate/quickstart/Applabsuser.hbm.xml"/>

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



Hibernate tutorial
Introduction to Hibernate
Overview of Hibernate
Features of Hibernate
Getting Started with Hibernate
Prepare Database
Create Persistent Java Objects
Mapping POJO With Persistence Layer Using Hibernate Mapping Document
Hibernate Configuration File
Hibernate Sample Code (Inserting new record)
Hibernate Sample Code (Quering the database)
Hibernate O/R Mapping
Hibernate Mapping In Depth
Hibernate Query language
Hibernate Complete Example
Use of this website constitutes acceptance of the AllAppLabs.com Terms and Conditions