if( c.equals(Identifier.class)){
      throw new DotStateException("Identifiers are no longer Inodes!");
    }
    try {
      String tableName = ((Inode) c.newInstance()).getType();
      HibernateUtil dh = new HibernateUtil(c);
      // dh.setQuery("from inode in class " + c.getName() + " where ? in
      // (select tree.parent from com.dotmarketing.beans.Tree tree
      // where inode.inode = tree.child and tree.relationType = ?)");
      String sql = "SELECT {" + tableName + ".*} from " + tableName + " " + tableName + ", tree tree, inode "
      + tableName + "_1_ where tree.child = ? and tree.parent = " + tableName + ".inode and " + tableName
      + "_1_.inode = " + tableName + ".inode and tree.relation_type = ? and "+tableName+"_1_.type = '"+tableName+"' ";
      Logger.debug(InodeFactory.class, "hibernateUtilSQL:getChildOfClassByRelationType\n " + sql + "\n");
      dh.setSQLQuery(sql);
      Logger.debug(InodeFactory.class, "inode:  " + p.getInode() + "\n");
      dh.setParam(p.getInode());
      dh.setParam(relationType);
      return dh.load();
    } catch (Exception e) {
      Logger.error(InodeFactory.class, "getChildrenClass failed:" + e, e);
      throw new DotRuntimeException(e.toString());
    }
  }