Working with Query Keys
Use a direct query key as an alias for a field name. Query keys allow TopLink expressions to refer to a field using Java attribute names (such as firstName), rather than DBMS-specific names (such as F_NAME).
Use query keys to:
- Enhance code readability when defining TopLink expressions.
- Increase portability by making code independent of the database schema. If you rename a field, the query key could be redefined without changing any code that references it.
- Interface descriptors define only common query keys shared by implementors; the fields aliased could have different names in the implementor's tables.
Related Topics
About TopLink Descriptors
Automatically Generating Query Keys
Using Query Keys in Interface Descriptors
Using Relationship Query Keys
Specifying Query Keys
Working with Descriptors
Copyright © 1997, 2004, Oracle.
All rights reserved.