Defining Component Primary Identifier Mapping

You define component primary identifier mapping as follows:

  1. Define one persistent attribute as primary identifier.
  2. Define the type as Value type class.
  3. Define attribute mappings for the Value type class.

Attributes of value type classes are mapped to columns, which are embedded in primary tables mapped by other entity classes. So you have to add primary tables of the containing classes as value type classes' mapping sources. If the value type class is used in more than one entity class, you should map each of its persistent attributes to multiple columns of tables of these classes.

For example, Value type class Address is used as attribute type for two classes, Product and Customer.



The attributes of the Value type class Address can be mapped to columns of two tables, Company table and Customer table.



The mapping is easier to visualize in the Mapping Editor.




Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com