New Posts New Posts RSS Feed: Error in cache query
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Error in cache query

 Post Reply Post Reply
Author
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Topic: Error in cache query
    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.




Edited by smi-mark - 08-Nov-2012 at 3:06pm
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 08-Nov-2012 at 5:57pm
Do you have a snippet of your query?
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post 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>

Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down