Live Framework DataEntry Query $filter startswith does not work with Type field
- I have found a potential bug and need some validation or a work around.
i have a LINQ query that looks like:
var tagEntries = (from te in mc.TagsDF.CreateQuery<DataEntry>() where te.Resource.Type.StartsWith(type) select te);This is generating a URL like:
https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/<MeshObjectID>/DataFeeds/<DataFeedID>/Entries/?$filter=startswith(Type,'Tag')
Problem: This query does not work. Same behavior executing directly from the LiveFX Browser...
However, the following query with Title instead of Type will work:
https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/<MeshObjectID>/DataFeeds/<DataFeedID>/Entries/?$filter=startswith(Title,'Tag')
There is very little documentation on $filter limitations--only a small list of examples, of which startswith(Type,'value') is excluded.
Please advise asap.
Réponses
- Bug has been submitted:It would be very helpful if you could address a related issue:Thanks, -Shawn.
- Marqué comme réponseYi-Lun LuoMSFT, Modérateurjeudi 9 juillet 2009 03:33
Toutes les réponses
- Update
It appears my problem is currently isolated to a particular DataFeed. I have tested the $filter=startswith(Type,'Tag') function on other DataFeeds with success. However, on the feed i need it to work on, i'm receiving the following error:
{ "Title" : "ErrorResource", "Code" : 410, "Message" : "An error has occurred." }Cause of Problem
After more investigation, I have determined the cause of this problem--these functions break if there are DataEntries without a Type field or Type == null. In summary:
- You CANNOT use the startswith() or contains() filters if the DataFeed contains a DataEntry where the field referenced in the function (in this case Type) == null. I presume this applies to other fields; however, i haven't confirmed it--i know it's the case with Type.
- The operators, such as eq and ne work fine on null fields. Only the partial match functions startswith, contains, etc. will fail.
Work Around
THIS IS A BUG from my perspective. I would like the LiveFX team to validate that or explain why if this is as it was intended.
If you use any of the partial match functions, then the work-around is simply to ensure no DataEntries have null values for that field. In my case, once all of my DataEntries had a value for Type, the partial match functions work. - Hello, thanks for reporting this issue. I can reproduce it on my side. Can you please submit a feedback on https://connect.microsoft.com/site/sitehome.aspx?SiteID=630?
Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.- Proposé comme réponseVikas-AhujaMSFT, Modérateurmercredi 8 juillet 2009 04:59
Thanks shwan for reporting this, please go ahead and log a bug at following link:
https://connect.microsoft.com/liveframework/feedback?wa=wsignin1.0
thanks a lot!
This posting is provided "AS IS" with no warranties, and confers no rights.- Proposé comme réponseVikas-AhujaMSFT, Modérateurmercredi 8 juillet 2009 04:59
- Bug has been submitted:It would be very helpful if you could address a related issue:Thanks, -Shawn.
- Marqué comme réponseYi-Lun LuoMSFT, Modérateurjeudi 9 juillet 2009 03:33

