I a running a linq query against a postgres database and the identifiers in the lightspeed generated query are quoted. I did NOT set QuotedIdentifers to true in the config file or in code and verified that the default value is false. Logging from lightspeed shows that all queries have the identifiers quoted.
But the following query causes an NpgsqlException exception:
Npgsql.NpgsqlException:
column g1.gamingterminalid does not exist
Severity: ERROR
Code: 42703
at Npgsql.NpgsqlState.<ProcessBackendResponses_Ver_3>d__a.MoveNext()
at Npgsql.ForwardsOnlyDataReader.GetNextResponseObject()
at Npgsql.ForwardsOnlyDataReader.GetNextRowDescription()
at Npgsql.ForwardsOnlyDataReader.NextResult()
at Npgsql.ForwardsOnlyDataReader..ctor(IEnumerable`1 dataEnumeration, CommandBehavior behavior, NpgsqlCommand command, NotificationThreadBlock threadBlock, Boolean synchOnReadError)
at Npgsql.NpgsqlCommand.GetReader(CommandBehavior cb)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior cb)
at Npgsql.NpgsqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at ...()
at ..(IUnitOfWork , IDbCommand , )
at ..(IUnitOfWork , IDbCommand )
at Mindscape.LightSpeed.Data.DataProviderAdapter.(IUnitOfWork , , ProviderOptions )
at ..(Query )
at Mindscape.LightSpeed.UnitOfWork.Project(Query query)
at Mindscape.LightSpeed.Linq.Plan.GroupResultsPlan.ExecuteImmediate(IUnitOfWork unitOfWork, Type returnType)
at Mindscape.LightSpeed.Linq.LinqQueryProvider.Execute(Expression expression)
at Mindscape.LightSpeed.Linq.LinqQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression)
at Mindscape.LightSpeed.Linq.LinqQuery`1.GetEnumerator()
at BlueYonder.Server.BusinessProcesses.MeterBP.MeterEndOfDay(DateTime eod) in C:\Source\Trunk\TerminalManager\TerminalManager\BusinessProcesses\MeterBP.cs:line 330
at BlueYonder.Server.BusinessProcesses.MeterBP.CheckEndOfDayActivity() in C:\Source\Trunk\TerminalManager\TerminalManager\BusinessProcesses\MeterBP.cs:line 295
at BlueYonder.Server.TerminalManager..ctor() in C:\Source\Trunk\TerminalManager\TerminalManager\TerminalManager.cs:line 107
at BlueYonder.Server.ServerController..ctor(Boolean runAsService) in C:\Source\Trunk\TerminalManager\TerminalManager\ServerController.cs:line 99
Generated Query:
SELECT
g1.GamingTerminalId
FROM
(
SELECT
Meters.GamingTerminalId AS "GamingTerminalId"
FROM
Meters Meters
GROUP BY
Meters.GamingTerminalId
)
g1
--> Time: 0 ms
linq query:
var currentMetersByTerminalIdByMeterDefId =
(from meters in Repository.UnitOfWork.MeterEntities
group meters by meters.GamingTerminalId into tg
select new
{
TerminalId = tg.Key,
MetersDefinitionGroups =
from terminalMeters in tg
group terminalMeters by terminalMeters.MeterDefinitionId into mdg
select new
{
MeterDefinitionId = mdg.Key,
Meters = mdg,
}
}).IncludeDeleted();
foreach (var currentTerminalMeters in currentMetersByTerminalIdByMeterDefId)
{
-----> Exception occurs on previous foreach
We are using the LightSpeed nightly build from 9/19.
Is there a work around to fix this? Or do we need to update to a different version of LightSpeed?
Thanks for your help.
Nick