Comments (2)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 CraigWigley commented Permalink

Great entry Matt

2 PatrickHourigan commented Permalink

Nice work Matt! <div>&nbsp;</div> Here's the Oracle version (I'll go for a Materialized View for that bit more ummpf!!) <div>&nbsp;</div> CREATE MATERIALIZED VIEW CLASSHIERARCHY ( path, <br /> entityId <br /> ) <br /> AS <br /> WITH CLASSPATHS AS ( <br /> SELECT ec.classId, <br /> SYS_CONNECT_BY_PATH(ec.className, '/') AS path <br /> FROM entityClass ec <br /> START WITH ec.className = 'Core' <br /> CONNECT BY PRIOR ec.classId = ec.superclassId <br /> ) <br /> SELECT CLASSPATHS.path, c.entityId FROM CLASSPATHS <br /> INNER JOIN classMembers c ON c.classId = CLASSPATHS.classId <br /> ORDER BY CLASSPATHS.path