code: private void appendSuperClassJoin(ClassDescriptor cld, ClassDescriptor cldSuper, StringBuffer stmt, StringBuffer where)
      {
          stmt.append(",");
          appendTable(cldSuper, stmt);
  
          if (where != null)
          {
              if (where.length() > 0)
              {
                  where.append(" AND ");
              }
  
              // get reference field in super class
              // TODO: do not use the superclassfield anymore, just assume that the id is the same in both tables - @see PBroker.storeToDb
              int superFieldRef = cld.getSuperClassFieldRef();
              FieldDescriptor refField = cld.getFieldDescriptorByIndex(superFieldRef);
  
              appendTable(cldSuper, where);
              where.append(".");
              appendField(cldSuper.getAutoIncrementFields()[0], where);
              where.append(" = ");
              appendTable(cld, where);
              where.append(".");
              appendField(refField, where);
          }
      }
docs: /*
  arminw:
  TODO: this feature doesn't work, so remove this in future