odata - Issue with Any/All support in WCF Data Service V5 -


i started using , not working reflectionprovider on linq sql. , failig following error. pointers in how fix this.

unhandled exception: system.data.services.client.dataservicequeryexception: error occurred while processing request. —> system.data.services  .client.dataserviceclientexception: **an error occurred while processing request.argument type  s not matchsystem.argumentexception @ system.linq.expressions.expression.condition(expression test**, expressio  n iftrue, expression iffalse)  

i have encountered same problem while using wcf data services v5 nhibernate (which use re-linq queryprovider). have found different expressions generated depending if run following linq query directly against nhibernate session or against data services client:

.where(x => x.staff.any(y => y.firstname == "bill")) 

if query against session generates following expression:

{value(nhibernate.linq.nhqueryable`1[wcfdataservicestest.entities.store]).where(x => x.staff.any(y =    > (y.firstname == "bill")))} 

but when query client following:

{value(nhibernate.linq.nhqueryable`1[wcfdataservicestest.entities.store]).where(it => iif((it.staff == null), empty(), it.staff).any(p => (p.firstname == "bill")))} 

notice conditional expression (iif...)?

i don't know reason yet, i've found half decent workaround use until do:

http://abilityforge.com/?p=18

edit: here detailed explanation of seems problem (and better solution it): http://blog.davidebbo.com/2011/08/how-odata-quirk-killed-nuget-server.html


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -