This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
This is the 3rd different bug I've found/reported for LINQ access to a PostgreSQL DB using GROUP BY. I really appreciate the support that I've received and I don't want to sound negative but I've got to be honest and say that i'm quickly losing confidence in the product.
I'm getting a LightSpeed exception from the following code:
var groups = from sd in uow.SearchDetails join ld in uow.LoginDetails on sd.LoginId equals ld.Id where (sd.SearchTimestamp >= retFromDate && sd.SearchTimestamp < retToDate.AddDays(1)) && (retCompanyId.Length == 0 || ld.CompanyId == retCompanyId) group ld by new {ld.UserId, ld.ClientId} into g select new {g.Key, SearchCount = g.Count()};
Exception Info:
LightSpeedException was unhandled by user code Grouping key is not defined on the entity
at Mindscape.LightSpeed.Linq.Plan.GroupResultsPlan.GroupingSelector.GetSelectorFor(TypeModel rootTypeModel, String attribute) at Mindscape.LightSpeed.Linq.Plan.GroupResultsPlan.MultiKeyGroupingSelector.GetSelectorFor(TypeModel rootTypeModel, Type groupingKeyType, List`1 groupingOn) at Mindscape.LightSpeed.Linq.Plan.GroupResultsPlan.GetAllGroupsAtOnce(IUnitOfWork unitOfWork, IList groupingKeys, IList interimKeys, List`1 groupingOn, GroupResultsTypeHandler handler) at Mindscape.LightSpeed.Linq.Plan.GroupResultsPlan.FetchResultSetForMultipleGroupingKeys(IUnitOfWork unitOfWork, IList groupingKeys, IList interimKeys, GroupResultsTypeHandler handler) 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 Infofinder.Statistics.WebService.Service.GetSearches(String fromDate, String toDate, String companyId) in C:\\_SVN\\NxGen\\trunk\\src\\Infofinder.Statistics.WebService\\Service.svc.cs:line 1452 at Infofinder.Statistics.WebService.Service.GetSearchesAsXml(String fromDate, String toDate, String companyId) in C:\\_SVN\\NxGen\\trunk\\src\\Infofinder.Statistics.WebService\\Service.svc.cs:line 238 at SyncInvokeGetSearchesAsXml(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
Thanks... Alan |
|
|
The first two GROUP BY problems that I experienced (described in thread 2906) have already been resolved:
I believe that this "Grouping key is not defined on the entity" error is the final GROUP BY problem that is keeping me from completing the task at hand.
Any feedback on the status of this one?
Thanks... Alan
|
|
|
Hi Alan, We are currently still working on a fix for this, will advice once we have this committed and available in the nightlies.
Jeremy |
|
|
Hi Alan, I have put through a candidate fix for this in the nightlies based on a couple of tests which appear to be good repro's for what you described in the original issue. This will be available in the 20100407 nightly. Let us know if this covers the issue or if there are any further problems.
Jeremy |
|
|
Thanks Jeremy! I'll let you know how my testing goes. |
|
|
This fix stopped the exception that I was having. Thanks... Alan |
|