Skip to content

coderdeepak/hibernate-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HIBERNATE - Tutorial

Experimenting with the following tutorial http://docs.jboss.org/hibernate/core/3.3/reference/en/html/tutorial.html - with updates as suggested in the Hibernate Core Migration Guide: 3.6 http://community.jboss.org/wiki/HibernateCoreMigrationGuide36

To download dependencies and compile:

mvn compile

To launch the HSQLDB server:

mvn exec:java -Dexec.mainClass="org.hsqldb.Server" -Dexec.args="-database.0 file:target/data/tutorial"

To create a new entity and store it in the database:

mvn -q exec:java -Dexec.mainClass=org.hibernate.tutorial.EventManager -Dexec.args=store

To list events in the DB:

mvn -q exec:java -Dexec.mainClass=org.hibernate.tutorial.EventManager -Dexec.args=list

To add a person to an event (association between two entities):

mvn -q exec:java -Dexec.mainClass=org.hibernate.tutorial.EventManager -Dexec.args=addpersontoevent

To add an email to a person (multi-valued attribute):

mvn -q exec:java -Dexec.mainClass=org.hibernate.tutorial.EventManager -Dexec.args=addemailtoperson

About

Source code examples and my tests from Jboss' Hibernate Tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published