
Chapter 4 Generating Hibernate Persistent Objects and JSF Pages
Defining attribute mappings
Attributes can be migrated attributes or ordinary attributes. Ordinary attributes can be mapped to columns or formulas. Migrated attributes do not require attribute mapping.
Attribute mapping can be generated during OOM-to-PDM or PDM-to-OOM generation. You can also use the mapping editor to define attribute mappings.
The following types of mapping are possible:
- Map attribute to formula - When mapping an attribute to a formula, you should ensure that the syntax is correct. There is no column in the source table of the attribute mapping.
- Component attribute mapping - A component class can define the attribute mapping as for other classes, except that there is no primary identifier.
- Discriminator mapping - In inheritance mapping with a one-table-per-hierarchy strategy, the discriminator needs to be specified in the root class. You can define the discriminator in the Hibernate tab of the class property sheet.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|