Good day,
Our company has been running LLBL Gen Pro for some time without issue. The original developer who had implemented LLBL Gen is no longer around.
I have been generating entities for 2+ years with no flaws; however, yesterday, after adding a new column to our employee table, saving, and generating entity class changes, when attempting to save to our Employee entity, I received the following error:
Additional information: The field name 'TaxTypeId' isn't known in the element 'EmployeeEntity'
I verified the following:
1) My local database does have the required column on the employee table
2) All my projects reference the same version of LLBL
Below is additional information. Thank you for your time and any help you can provide.
Post the LLBLGen Pro version: 2.6
Runtime Version:v2.0.50727
Database: Sql server 2014
Stack Trace:
at SD.LLBLGen.Pro.ORMSupportClasses.PersistenceInfoProviderBase.GetFieldPersistenceInfo(String elementName, String fieldName)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetFieldPersistenceInfo(IEntityField2 field)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateQueryFromElements(IEntityFields2 fieldCollectionToFetch, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize, IFieldPersistenceInfo[]& persistenceInfo, IRetrievalQuery& selectQuery)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchProjection(List`1 valueProjectors, IGeneralDataProjector projector, IEntityFields2 fields, IRelationPredicateBucket filter, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IGroupByCollection groupByClause, Boolean allowDuplicates, Int32 pageNumber, Int32 pageSize)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProvider2.ExecuteValueListProjection(QueryExpression toExecute)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.ExecuteExpression(Expression handledExpression)
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
at Pay.ClientDB.Repository.EmployeeRepository.FetchCountEmployees(Guid accountId, Nullable`1 isActive) in c:\newprojects\newpayroll\ClientDB\Pay.ClientDB.Repository\EmployeeRepository.cs:line 1885
Fetch Method:
public int FetchCountEmployees(Guid accountId, bool? isActive = null)
{
var md = new LinqMetaData(_tran.RepAdapter);
var q = from e in md.Employee
join stat in md.RefEmpStatus on e.EmpStatusCode equals stat.Code
where e.AccountId == accountId
select e;
var results = q;
if (isActive.HasValue)
{
results = q.Where(x => x.RefEmpStatus.IsActive == (isActive.Value ? "Y" : "N"));
}
return results.Count();
}