'entity.entitygroupid' threw an exception of type 'SD.LLBLGen.Pro.ORMSupportClasses.ORMEntityOutOfSyncException'
is the error I get.
Infact I get that error for all columns in that entity.
AppEntity entity = new AppEntity(38, true);
using (DataAccessAdapter adapter = new DataAccessAdapter("UserID=dba;Password=****;DatabaseName=mydbnm;ServerName=mydbnm; AutoStop=No;CommLinks=TCPIP();Persist Security Info=True"))
{
adapter.FetchEntity(entity);
}
I added the following code in the user code region
//since AppID is already decimal lets polymorph using the boolean variable
public AppEntity(System.Decimal valueID, Boolean isentitygroup)
: base("AppEntity")
{
InitClassEmpty(null, CreateFields());
if (startMonth)
{
this.EntityGroupID= valueID;
}
else
{
this.EntityPanelID= valueID;
}
}
The database schema is
App{appID, appCode, appDesc, entitygroupid, entityPanelID}
where all are decimal columns except appDesc is varchar(255)
PS: there is ONLY one record with that value 38 that I am passing