Specifying Field Names and Multiple Tables

When defining mappings in code, TopLink assumes all mappings are in the first table specified by the descriptor's setTableName() or addTableName() method. If the persistent class stores information in multiple tables, any messages sent that require field names should be implemented to pass fully qualified names (that include the table name). Use the following syntax to fully qualify a field:

someMessage("tablename.fieldname");


Related Topics

About TopLink Descriptors

About TopLink Mapping Types
Working with Common Mapping Properties
Specifying Direct Access and Method Access
Specifying Read Only Settings
Defaulting Null Values
Maintaining Bidirectional Relationships
Specifying Collection Properties
Specifying Mapping Information in ejb-jar.xml File
Working with Descriptors

 

Copyright © 1997, 2004, Oracle. All rights reserved.