Saturday, June 30, 2007

An introduction to HIbernate 3 Annotations

clipped from www.onjava.com
An Introduction to Hibernate 3 Annotations

Generating Primary Keys

One thing Hibernate is good at is automatically generating primary keys. The Hibernate/EBJ 3 annotations also provide a rich support for automatic key generation, allowing a variety of strategies. The following example illustrates a frequently used approach, where Hibernate will decide on an appropriate key generation strategy depending on the underlying database:

Customizing Table and Field Mappings

Mapping Relationships

Named Queries

0 comments: