Error in cache query
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3782
Printed Date: 19-Sep-2025 at 2:25am
Topic: Error in cache query
Posted By: smi-mark
Subject: Error in cache query
Date Posted: 08-Nov-2012 at 3:03pm
Not sure why this is happening yet but I've found an exception when querying cache. The problem is in CacheQueryExpressionVisitor
me = String.Empty expr = null
I've never seen this before as we usually search against the database - this time it is in cache. If I make it go to the datasource, it works fine.

|
Replies:
Posted By: kimj
Date Posted: 08-Nov-2012 at 5:57pm
Do you have a snippet of your query?
|
Posted By: smi-mark
Date Posted: 08-Nov-2012 at 6:20pm
Selector: System.Func<System.Linq.IQueryable<RefundTrac.Model.RefundQueue>,System.Linq.IQueryable<RefundTrac.Model.Projections.RefundListItem>>
Predicate: u => ((True AndAlso u.Refund.TaxAccountNumber.Contains(value(RefundTrac.DomainServices.Services.Queue.QueueSearchService+<>c__DisplayClass2).str)) AndAlso (u.UserId == value(RefundTrac.ViewModels.Queue.QueueSearchViewModel).User.UserId))} System.Linq.Expressions.Expression<System.Func<RefundTrac.Model.RefundQueue,bool>>
Final query
value(IdeaBlade.EntityModel.EntityQueryProxy`1[RefundTrac.Model.RefundQueue]).Where(u => ((True AndAlso u.Refund.TaxAccountNumber.Contains(value(RefundTrac.DomainServices.Services.Queue.QueueSearchService+<>c__DisplayClass2).str)) AndAlso (u.UserId == value(RefundTrac.ViewModels.Queue.QueueSearchViewModel).User.UserId))).Select(q => q.Refund).Select(q => new RefundListItem() {RefundId = q.RefundId, Amount = q.Amount, Status = q.RefundStatus, Step = q.CurrentStep, RefundType = q.RefundType, TaxAccount = q.TaxAccountNumber, CreateDate = q.CreateDate, PayeeName = IIF(q.RefundPayees.Any(), q.RefundPayees.FirstOrDefault().Name1, "Unassigned"), LastUser = IIF(q.RefundAudits.Any(), q.RefundAudits.OrderByDescending(a => a.AuditDate).Select(a => a.AuditUser).FirstOrDefault(), String.Empty), LastUpdate = IIF(q.RefundAudits.Any(), q.RefundAudits.OrderByDescending(a => a.AuditDate).Select(a => Convert(a.AuditDate)).FirstOrDefault(), null)})} IdeaBlade.EntityModel.IEntityQuery<RefundTrac.Model.Projections.RefundListItem> {IdeaBlade.EntityModel.EntityQuery<RefundTrac.Model.Projections.RefundListItem>
|
Posted By: kimj
Date Posted: 09-Nov-2012 at 12:17pm
I'm not able to reproduce a scenario where the visitor is ever receiving a null Expression argument in this method, so I'm afraid I'm going to need to see the code for how you build up this query. If you don't wish to post it here you can PM or email me.
|
|