This project is read-only.

LinqSQLParser Custom View Code Generation Error

Oct 26, 2010 at 7:58 PM

Policy won't allow me to send my model file, but I wanted to make you aware of a code generation problem that I'm encountering.  This is a created from scratch (non-imported) model, everything generated and compiled fine, until I added the first custom view.  Now using the latest version of nHydrate, I get compliation errors inside the LinqSQLParser.Generated.cs files inside the DAL and EFDAL layers.  In both cases, it generates the following inside the RemapParentChild method:

if(_type == ObjectTypeConstants.View)
{
   else if (fromClause.TableName == "vRequests")
   {
      childTables.Add(fromClause);
    }
}

 

which should of course be simply

 

if(_type == ObjectTypeConstants.View)
{
   if (fromClause.TableName == "vRequests")
   {
      childTables.Add(fromClause);
    }
}

 

since this is the first and only view.   After manually correcting the error in both places it complies and the regular tables/objects seem to work fine, although I haven't written any code which uses the view yet.