This project is read-only.

EF / TypeTable

Nov 28, 2010 at 10:43 PM


I have created a model with a TypeTable. I am trying to use this with MVC. I have a table (PERSONEN(=PERSONS)) which has a relation with as typetable (GESLACHTEN(=GENDER)). When I set the property IsTypeTable of the the table GENDER to TRUE and generate to two EF projects and try to use it in the MVC application I receive the following error:

The associated metadata type for type 'Ansem.GCDHACore.EFDAL.Entity.PERSONEN' contains the following unknown properties or fields: PersGeslachtFK. Please make sure that the names of these members match the names of the properties on the main type.

 In the class PERSONENMetaData there is a property PersGeslachtFK. In the class PERSONEN there isn't a property PersGeslachtFK, instead there is the following:

public virtual GESLACHTENWrapper GESLACHTEN
get { return _persGeslachtFK; }
Widgetsphere.EFCore.EventArgs.ChangingEventArgs<GESLACHTENConstants> eventArg = new Widgetsphere.EFCore.EventArgs.ChangingEventArgs<GESLACHTENConstants>(value"GESLACHTEN");
if (eventArg.Cancel) return;
_persGeslachtFK = eventArg.Value;


Is there a bug in nHydrate or do I something wrong ?

Nov 28, 2010 at 10:55 PM

Forgot to say, when i set the property IsTypeTablee to False there is NO error.