openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amy Yang (JIRA)" <>
Subject [jira] Created: (OPENJPA-583) MetaDataInheritanceComparator/InheritanceComparator need some improvement
Date Sat, 26 Apr 2008 06:17:57 GMT
MetaDataInheritanceComparator/InheritanceComparator need some improvement

                 Key: OPENJPA-583
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.0.2, 1.0.3, 1.1.0, 1.2.0
         Environment: Windows XP
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
            Reporter: Amy Yang
            Priority: Minor

Current MetaDataInheritanceComparator/InheritanceComparator has 2 problems:
1. the support of interfaces seems incorrect.
    when calculating the level value of an interface, the logic is
        if (to.isInterface())
            return to.getInterfaces().length;
    we should calculate the level value also based on the inheritance of the interfaces.
2. when comparing 2 objects (o1 and o2) with MetaDataInheritanceComparator, if o1 has a primary
key field p1, then we should compare p1 and o2 first, and then compare o1 relative to the
    current logic seems incomplete:
        for (int i = 0; i < fmds.length; i++) {
            if (fmds[i].isPrimaryKey() && m2.getDescribedType().
                return 1;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message