Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Teneo/Hibernate/Tutorial

< Teneo‎ | Hibernate
Revision as of 03:34, 3 March 2010 by Unnamed Poltroon (Talk) (New page: __TOC__ This tutorial shows how EMF, Teneo and Hibernate work together to automatically create the database schema and persist EMF objects. The tutorial also shows examples of [http://doc...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Contents

This tutorial shows how EMF, Teneo and Hibernate work together to automatically create the database schema and persist EMF objects. The tutorial also shows examples of HQL queries for EMF object and using the EMF Hibernate resource.

This tutorial uses the example project which you can download here.

This tutorial assumes some basic knowledge of EMF. If you are new to EMF then it can make sense to first try one of the core EMF tutorials which you can find here.

Initial Setup

The tutorial assumes that you have a running Eclipse with EMF and Teneo installed. In addition the Teneo dependencies (incl. hsqldb and mysql drivers) should be installed. See the Download & Install page for more information.

This tutorial uses hsqldb but it can easily be changed to use mysql or another database. For other databases than hsqldb and mysql you need to take make sure that the jdbc driver is in the classpath of the org.eclipse.emf.teneo.hibernate.examples project.

For mysql and other non-in-memory databases you have to create the database up-front (so not the tables inside the database but just the database itself). For this tutorial the database name should be: library.

Back to the top