If matching inheritance using a table for a particular class, when matching specific classes, is just like any other class (without subclassing), NHibernate allows the same PK for subclasses. For example, if you have BillingDetails and subclasses of CreditCard and BankAccount, a query for all BillingDetails will give you all the records from both tables, which, in turn, may have duplicate primary keys, which can be problematic due to the invalid business identity of these objects. This, of course, does not apply to guides and the like, but what about cases with the same identifiers or sequence identifier generators?
Just the question is, is there a real use of duplicate key keys in this scenario when requesting such a polymorphic request? Can these duplicate identifiers cause problems for NHibernate when working with objects inside?
source share