Hi,
I finally got round to looking at the inheritance functionality, and I'm struggling to get it working. I am using TargetPerEntityHierarchy inheritance. Here's what I have:
A table, called UserOrRole_RelatedDoc. This table for reasons I don't want to get into maps users or "roles" to documents. It contains a column called UserType, which is P for a person, or R for a role.
I thought this slightly quirky table would be a good candidate for inheritance, thinking I could create a sub-type for just Documents related to users (not roles).
So, I right-clicked it and chose to "make sub-type" in LLBLGen. I then got slightly confused at the "create sub-type dialog" asking me to specify the super-type disciminator column/value, and the subtype discriminator value. Heres what I did: I set the UserType column as the discrimnator, and for the sub-entity I entered a discriminator value of "P". I am trying to tell my new sub-type table to only be interested in rows from the original table where the UserType is P, so I fugure that makes sense. However, I dont know what to set for the discriminator value for the super-type, so I entered A - what should it be?
Anyway, after all this, I GEN'd the code, and when I do a fetch to get all of my derived (sub-type) entities, it brings them all back, not just the ones that are of type "P".
Can someone help? Have I got it all wrong?