hommels wrote:
SourceColumnName does not exist in Adapter model
private EntityBase2 _EnterpriseEntity = null;
for ( int i=0; i<_EnterpriseEntity.Fields.Count; i++ )
{
if ( ( _EnterpriseEntity.Fields[i].SourceColumnName != "PERSON_ID" ) && (
_EnterpriseEntity.Fields[i].SourceColumnName != "WEB_APPLICATION_ID" ) )
{
_EnterpriseEntity.Fields[i].CurrentValue = _EnterprisePrefs
[_EnterpriseEntity.Fields[i].SourceColumnName];
}
}
I could be wrong on this one, but I believe that that information is not accessible from within the entity itself. The reason is that the persistence information (source table, column, etc) is abstracted from the entity itself. You'll find methods of accessing that information within the DataAccessAdapter in the DatabaseSpecific project of the generated code. Check the PersistenceInfoFactory class.
I am curious, however, why access to the column name is required instead of using the entity's property name? You can use _EnterpriseEntity.Fields["PERSON_ID"] instead of attempting to reference the column name, or better, _EnterpriseEntity.Person_ID.
Jeff...