
Chapter 4 Generating Hibernate Persistent Objects and JSF Pages
Mapping one-to-one associations
There are three possibilities for one-to-one association mapping:
- Using a foreign key reference. In this case, the parent table's primary key columns are migrated as foreign key columns. The association mapping includes the reference and the two tables. The mapping file will generate the one-to-one tag.
- Using a primary key reference. In this case, the parent table's primary key columns are migrated as primary key and foreign key columns. The association mapping includes the reference and the two tables. The mapping file will use the foreign id generator class.
- Using a join table. This is unusual but possible. The association mapping includes the two references and the three tables. The mapping file will use the join-table tag.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|