0 Replies Latest reply on Nov 18, 2009 12:56 PM by csstell

    ORM Complexity

    csstell

      I have the following tables:

       

      ---Hierarchy 1: Table per subclass without discriminator---

      T1,T2,T3

       

      T1

      PK-Identity

       

      T2

      PK- is FK from T1

       

      T3

      PK- is FK from T1

      ---END: Hierarchy 1---

       

      ---Hierarchy 2: Table per hierarchy---

      T3

       

      T3

      PK- is FK from T1

      is_simple, type = bit. (not mentioned in Hierarchy 1 - but same table, just trying to only mention the essential fields per context)

      ---END: Hierarchy 2---

       

      CFCs:

      c1 table=t1

      c2 extends=c1, table=t2, joincolumn=t2.pk

      c3 extends=c1, table=t3, joincolumn=t3.pk, discriminatorColumn=is_simple

      c4 extends=c3, table=t3, discriminatorValue=1

       

      I get no errors when C1,C2,C3 exists only.

       

      But when I put c4 in my cfc location, and try to re-load the app I get:

      No discriminator found for C4. Discriminator is needed when 'single-table-per-hierarchy' is used and a class has subclasses.

       

      Anyone have any idea where Im going wrong here?