Specifying Private or Independent Relationships

In TopLink, object relationships can be either private or independent.

Aggregate object mappings are private by default, because the target object shares the same row as the source object. One-to-one, one-to-many, and many-to-many mappings can be independent or private, depending upon the application. Normally, many-to-many mappings are independent by definition; however, because a many-to-many mapping can be used to implement a logical one-to-many without requiring a back reference in the target to the source, TopLink allows many-to-many mappings to be private as well as independent.


Tip: TopLink automatically supports private relationships. Whenever an object is written to the database, any private objects it owns are also written to the database. When an object is removed from the database, any private objects it because are also removed. Be aware of this when creating new systems, since it may affect both the behavior and the performance of your application.

 

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