Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Examples/JPA/Migration/Hibernate/V3Annotations

< EclipseLink‎ | Examples‎ | JPA‎ | Migration‎ | Hibernate
Revision as of 13:19, 15 July 2008 by Douglas.clarke.oracle.com (Talk | contribs) (Custom Sequence Generator)

This example walks through the migration from Hibernate(TM) V3 using JPA + native annotations in combination with the native API to EclipseLink JPA.

Entity Annotations

Custom Sequence Generator

In Hibernate a custom generator for sequence values can be defined and used as:

   @Id
   @GeneratedValue(generator = "system-uuid")
   @GenericGenerator(name = "system-uuid", strategy = "mypackage.UUIDGenerator")
   public String getTransactionGuid()

With EclipseLink a custom sequence generator can be implemented and registered for use using the @GeneratedValue. How to use Custom Sequencing (ie. UUID)

Mapping Annotation

Back to the top