Hi Luis,

I think this method returns all fields to support interfaces and abstract classes too. But I agree you are right, if the ClassDescritor belongs to a "normal" class only the associated fields should be returned. But I'm not familiar with this stuff (side-effects?), so did you write a patched version of DescriptorRepository? Do all junit tests pass?

regards,
Armin

Luis Cruz wrote:
Hello,

We are working with OJB 1.0 release and we found a bug a few weeks ago.
Only now have we found time to determine the origin of the bug so here
goes.

In the DescriptorRepository class, in particular, in the method:

   getFieldDescriptorsForMultiMappedTable

the following snip of code is used to obtain the field descriptors of
the target class descriptor:

   synchronized (m_multiMappedTableMap)
   {
      retval =
getAllMappedColumns(getClassesMappedToSameTable(targetCld));
      m_multiMappedTableMap.put(targetCld.getClassNameOfObject(),
retval);
   }

Basically this code is retrieving all the field descriptors of all the
class descriptors mapped to the same table. This is a bug is it not? If
I'm missing something I would greatly appreciate an explanation.

As a result of this behavior, OJB latter materializes all the columns of
the table for objects which are mapped on the same table, even columns
that are not mapped to the object being materialized. A more detailed
description of the collateral damage induced by this behavior can be
found in a previous mail I submitted; the subject of the mail was:

   Possible bug Mapping All Classes on the Same Table

I think a simple fix for this bug can be simply getting all mapped
columns for the target class descriptor instead of getting all mapped
columns for all the classes mapped to the same table, but I'll leave
this up to you experts.

Best regards,
Luis Cruz


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to