Differences between revisions 2 and 3
Revision 2 as of 2004-11-18 10:33:08
Size: 1213
Editor: ua
Revision 3 as of 2004-11-18 10:35:14
Size: 1257
Editor: ua
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
''Sorry, bug database is not avaliable''

Sorry, bug database is not avaliable

org.apache.ojb.broker.accesslayer.MtoNCollectionPrefetcher bug

in method

    private Criteria buildPrefetchCriteria(Collection ids, String[] fkCols, String[] itemFkCols,
            FieldDescriptor[] itemPkFields)
        if (fkCols.length == 1) //bug is here
            return buildPrefetchCriteriaSingleKey(ids, fkCols[0], itemFkCols[0], itemPkFields[0]); //only first item's foreign key passed
            return buildPrefetchCriteriaMultipleKeys(ids, fkCols, itemFkCols, itemPkFields);


assumption that if parent table has the only foreign key then item table has the only FK too is incorrect.

<collection-descriptor name="recipients" element-class-ref="nVerge.commons.User"
auto-delete="link" auto-retrieve="true" auto-update="link"
 <fk-pointing-to-this-class column="hot_folder_id"/>
 <fk-pointing-to-element-class column="user_login"/>
 <fk-pointing-to-element-class column="user_network_id"/> <!-- this FK is not put into where criteria -->

Quickfix for this is  if (fkCols.length == 1 && itemFkCols.length == 1) 

Bugs (last edited 2009-09-20 22:56:16 by localhost)