[Announcement] ODataLib 6.3.0 Release


We are happy to announce that the ODL 6.3.0 is released and available on nuget along with the source code oncodeplex (please read the git history for the v6.3.0 code info and allprevious version). Detailed release notes are listed below.

Bug Fix

  • Fix a bug for serializing floating-point values to NaN, INF, and -INF.

New Features

  • EdmLib & ODataLib now supports model reference

  ODataLib now supports referencing external CSDL document by using the edmx:Reference element, or specifies the schemas and annotations to include from the target document using the edmx:Include and edmx:IncludeAnnotations element, The scope of a CSDL document is now the document itself and all schemas included from directly referenced documents

 

  • ODataLib now supports reading and writing delta response

      ODataLib now supports the client to request the service track changes to a result by specifying the odata.track-changes preference on a request. If supported for the request, the service includes a Preference-Applied header in the response containing the odata.track-changes preference and includes a delta link on the last page of results. The client is able to request changes by invoking the GET method on the delta link. For details, see 11.3 Requesting Changes of the OData Version 4.0 protocol.

  • EdmxReader supports ignoring the unknown attribute/element in new TryParse API

ODataLib Parser now supports emit a warning upon unknown attributes/elements in the metadata document instead of throwing an exception.

 

  • ODataUriParser now supports parsing Enum and ComplexType in Cast

ODataLib Parser now supports implicitly casting derived complex type to base type and underlying enum values to enum type in filter clause.

 

  • ODataUriParser adds support for parsing relative Uri without service root

ODataUriParser now does not enforce a service root URI in construction. This is handy when you are trying to parse a query option with only the model and the  relative uri.

 

Misc

  • ATOM is disabled by default in OData reader & writer

Odatalib now suppress the reader/writer of ATOM payload by obsoleting these methods for the reason that  ATOM payload is still is still a committee drafted standard as of now. We will support ATOM format once it become an official OASIS standard. Using these method will result in build warning with this release.

 

Perf Improvement

 

  • Improve the writer performance by cache metadata document URI. In a pure Action/Function scenarios the boost can be as high as 45%.

 


Comments (10)

  1. meh says:

    I really appreciate the fact that microsoft is providing a portable odata client. I am working on a large project having multiple clients accessing an odata data source V3.

    So i made a small test project to evaluate the new client. (using a small server written with WebApi 2.2)

    WPF seems to be fine.

    Silverlight 5 throws an ArgumentException at DataServiceQuery.BeginExecute(…)

    (some hResult check deep inside..)

    Store App throws an ArgumentException at DataServiceQuery.BeginExecute(…)

    (The 'User-Agent' header must be modified using the appropriate property or method.)

    Do you have any idea what could be wrong?

  2. Virus Quartirus says:

    Hi!

    Are you going to add service side support for ODataLib 6.x like you had that for ODataLib 5.x?

    Currently we have shared code/binaries between client and server, but now it looks like it's impossible to create WCF DataService for OData v4. So the only option that I see now is to make services based on WebApi 2.2.

    Will that true in future as well?

  3. Stephen says:

    Do you have an update on your plans for WCF Data Services?  I would like to take a crack at adding CORS support to it once it is open sourced.

  4. be42 says:

    Hi!

    Is this intended to run on silverlight 5? There seems to be a serious problem using the portable client with silverlight 5. For more information please check out:

    social.msdn.microsoft.com/…/silverlight-client-for-odata-version-4

  5. Perry says:

    Is there a change in the routing config after 6.0?

    Where can I find MapODataServiceRoute?

  6. be42 says:

    Problems with filter on enum property:

    I use WebApi 2.2 as server and Client for OData v4 as client. The entity class Pet has a property called Type which is an enum (Cat, Dog).

    Client creates ?$filter=cast(Type,'Edm.Int32') eq 1 for linq expression .Where(p => p.Type == PetType.Cat) but the ODataUriParser (server side) failes to parse.

    After replacing the .Where(..) to a custom filter string with AddQueryOption("$filter", "Type eq OData4Test.Entities.PetType'Cat'"), the parser works fine.

    Please provide a solution to this problem!

  7. be42 says:

    @perry

    System.Web.OData.Extensions.HttpConfigurationExtensions.MapODataServiceRoute(…)

  8. laylaliu says:

    @be42,

    The client issue has been fixed in OData Client 6.4.0.  Please upgrade your client to 6.4.0.

    .Where(p => p.Type == PetType.Cat) will be translated to ?$filter=Type eq OData4Test.Entities.PetType'Cat'.

  9. AdamCaviness says:

    Are you aware that Web API OData batch support is not transactional in the database?  That is, two changes from the client using SaveChangesOptions.BatchWithSingleChangeset produces two separate transactions when tracing with SQL Profiler.  If one fails, the other will not be rolled back.  This is serious.  We are attempting a port of our WCF DS Business Tier to Web API.  WCF DS batch support will wrap both changes in a single transaction.  Web API must have feature parity with WCF DS in this regard.  If is not something you as the OData Team can address but is a responsibility of the Web API team, please work with them to ensure this is addressed.

  10. Stephen says:

    @AdamCaviness – Usually the OData team does not really read the comments on their blog posts.  Especially after they have been up for a while.

    While I doubt you will see action on this issue, if you want a chance, I would recommend finding another channel of communication.  (Forms, Connect, Know someone in Microsoft etc.)