code: private RegistryEntry getRegistryEntryForChildFirstConfig(final RegistryEntry parentEntry, String childNodeName) {
          if (parentEntry == null)
              return null;
          //This will work in the unlikely event that childNodeName is actually the xml element name
          RegistryEntry pe = parentEntry;
          while (pe != null) {
              // The parent entry must have ibm:supportsExtensions defined for ibm:childAlias to be valid here
              if (pe.getObjectClassDefinition().supportsExtensions()) {
                  RegistryEntry childAliasEntry = metatypeRegistry.getRegistryEntry(pe.getPid(), childNodeName);
                  if (childAliasEntry != null)
                      return childAliasEntry;
              }
              pe = pe.getExtendedRegistryEntry();
          }
  
          //This will work in the more likely scenario that the node name has been replaced by the pid.
          // We didn't find an entry for the child alias, try using the PID/Alias
          RegistryEntry childEntry = getRegistryEntry(childNodeName);
          if (childEntry == null)
              return null;
  
          // check whether the parent element matches the child's ibm:parentPid
          // or the parent ibm:extends an OCD matching the child's ibm:parentPid
          final String ibmParentPid = childEntry.getObjectClassDefinition().getParentPID();
          for (String s = parentEntry.getPid(); s != null; s = getExtends(s))
              if (s.equals(ibmParentPid))
                  return childEntry;
  
          return null;
      }
docs: This method can retrieve a registry entry for an element using an ibm:childAlias for a node name.
  
  @param parent
  @param childNodeName This now seems to be the pid due to confusion about what "nodeName" might mean.
  @return the registry entry for the child, or <code>null</code> if no match was found