Table Inheritance Verify fail

Oct 14, 2011 at 10:15 AM

I design your database base on Table inheritance,  as link http://www.sqlteam.com/article/implementing-table-inheritance-in-sql-server

But when verify before generate, it rise error "Column 'PersonTypeID' must be mark unique because there is non-primary key relationship that depend on it".

Thanks,

 

Coordinator
Oct 18, 2011 at 1:16 AM

Would you please just send your model to me at chrisd@nhydrate.org? Also I know you have not generated yet but which DAL are you going to use NHDAL or EFDAL (Entity Framework)? Remember that the source field (or fields) of any relationship much be unique. Usually these are the PK of a table but they need not be. If yo have a type table like PersonType with a PersonTypeId field, it must be the PK of that table or at the very least marked unique.