I defined a view in my DB and then I wrote the entity definition in the code:
[Persistence]
[Table("ADMV_APPLICATION_OPTION")]
public partial class ADMV_APPLICATION_OPTION
{
public string ID_APPLICATION_OPTION { get; set; }
public string DS_APPLICATION_OPTION { get; set; }
public byte FL_TYPE { get; set; }
public Nullable<double> OPTION_NUM_VALUE { get; set; }
public string OPTION_STR_VALUE { get; set; }
public string OPTION_XML_VALUE { get; set; }
public System.Guid GUID_DIVISION_SAP { get; set; }
public string ID_DIVISION_SAP { get; set; }
public string ID_PLANT { get; set; }
}
When I execute my application I get the error
One or more validation errors were detected during model generation:
MES.Core.ADMV_APPLICATION_OPTION: : EntityType 'ADMV_APPLICATION_OPTION' has no key defined. Define the key for this EntityType.
Do I need a key also for the views?
thanks