views:

19

answers:

1

Hi

I have a TPH heirachy along the lines of:

A->B->C->D

A->B->C->E

A->F->G->H

A->F->G->I

I have A as Abstract, and all the other classes are concrete with a single discriminator column.

This works fine, but I want C and G to be abstract also. If I do that, and remove their discriminators from the mapping, I get error 3034 'Two entities with different keys are mapped to the same row'. I cannot see how this statement can be correct, so I assume it's a bug in some way.

Is it possible to do the above?

Lee

A: 

Seeing as they are abstract - so there are no entities in the database - have you tried just lying and pretending they do have a discriminator.

This should satisfy the mapping, but since the classes are abstract you still won't be able to create or materialize.

Alex

Alex James
Unfortunately no, as I get the error saying that two entities are being mapped to the same row.Lee
Lee Atkinson