Specifying Advanced Features by Amending the Descriptor

TopLink can populate a collection in ascending or descending order, upon your specification. To do this, specify and write an amendment method, sending the addAscendingOrdering() or addDescendingOrdering() to the many-to-many mapping. Both messages expect a string as a parameter, which indicates what attribute from the target object is used for the ordering. This string can be an attribute name or query key from the target's descriptor. Query keys are automatically created for and with the same name as all attributes mapped as direct-to-field, type conversion, object type, and serialized object mappings.


Related Topics

About CMP EJB Mappings
Working with CMR Relationship Mappings

 

Working with Many-to-Many Mappings

 

Creating Many-to-Many Mappings

 

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