#26 Deep property mapping and Inheritance

closed
None
5
2005-12-09
2005-12-02
No

Since 1.5.6 I have gotten rid of <field-deep> tag. In
the code you now miss the if and fall into the else
statement if you have deep properties. Basically it
becomes a problem with inheritance since we think you
already mapped the field. I have added the field name
(i.e. field.deepProperty) to the key so we are unique.

// these maps are special cases which do not
fall under what we are looking for
if (!isGenericFieldMap(fieldMapping) &&
!(fieldMapping instanceof ExcludeFieldMap)
&& !(fieldMapping instanceof MapFieldMap)) {
// then do no validation
} else {

// move this to method - corresponds to exact
same code in checkForSupertypeMapping()
String key = parentSourceField +
System.identityHashCode(sourceObj) + sourceClass.getName()
+ sourceMethodName + methodName +
fieldMapping.getSourceField().getName()
+ fieldMapping.getDestField().getName();
if (parentClassMap != null) {
if (superListOfFieldNames.contains(key)) {
continue;
} else {
superListOfFieldNames.add(key);
}
}

Fixed for 1.5.8+ release and in CVS at v15 branch. I
have attached the patched file.

Discussion

  • Franz Garsombke

    Franz Garsombke - 2005-12-02
    • status: open --> pending
     
  • Franz Garsombke

    Franz Garsombke - 2005-12-09
    • status: pending --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks