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

CDO/Hibernate Store/Model Relational Mapping

< CDO‎ | Hibernate Store
Revision as of 16:41, 21 January 2010 by Unnamed Poltroon (Talk) (New page: __TOC__ The CDO Hibernate Store can use Teneo for the Model Relational mapping. Teneo generates a mapping for Hibernate on the basis of the ecore model...)

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


The CDO Hibernate Store can use Teneo for the Model Relational mapping. Teneo generates a mapping for Hibernate on the basis of the ecore model and optional JPA annotations. JPA annotations can be specified directly in the model or in a separate xml.

Teneo supports all JPA annotations and many Hibernate extensions.

Annotations Format

The Teneo documentation has a detailed description of the format in which annotations can be specified. The main points are summarized here:

Teneo allows two ways to specify EJB3/JPA-like annotations:

  1. using the java annotations syntax in EAnnotations (ecore and xsd) (examples)
  2. a separate xml document (examples).

This page shows examples of both approaches.

JPA Annotations with a TYPE target can be used for EMF EClasses, annotations with METHOD and FIELD targets can be used for EStructuralFeatures. Note: JPA annotations relevant for a non-reference type java member can also be set on an EDataType.

The EAnnotations should adhere to the following format:

  • The source must be: teneo.jpa. You can also configure your own annotation source, see Teneo documentation for details.
  • The key must be: appinfo or value

See here for examples of how to define eannotations in Ecore or in a XML Schema file.



Wikis: CDO | Net4j | EMF | Eclipse

Back to the top