Kodo 4.2 - JDO - Not Handling Bi-Direcitonal Relationships Efficiently.

(Doc ID 1089968.1)

Last updated on MAY 24, 2017

Applies to:

Oracle Kodo - Version: 4.1 and later   [Release: and later ]
Oracle Weblogic Server - Version: 10.3.2 and later ]
Information in this document applies to any platform.


Given the following scenario using Kodo 4.2 JDO:
- Parent object has a one-to-many relationship to Child objects.
- Child has a field that is a reference back to the Parent (so a bi-directional relationship).
- The Child mapping of the field that references back to the Parent uses the default-fetch-group attribute

When setting a fetch plan programmatically that includes retrieving fields on Parent object (including the field that contains a collection of Child objects) plus Child's field that is a reference back to Parent, it was found that the SQL generated was very inefficient.  First a query looks up the fields for the Parent.  Next, there is a query for each Child element to look up its parent, even though the parents were looked up in the first query.




Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms