add more relations to dependency graph

relations added
- one for each step in the inheritance chain of input class C
- for root class in input class inheritance chain and for every subclass S,
  one to link parent(S) to S + one to link S to C
fixes two issues
- DDC599 foreign key violation
- DDC1041 stack overflow
update test case
- DDC599Test should be find by DDC599Subitem instead of DDC599Item