Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Batch support #3

Open
legacy-carlostorrao opened this issue Jun 20, 2013 · 2 comments
Open

Problem with Batch support #3

legacy-carlostorrao opened this issue Jun 20, 2013 · 2 comments
Assignees
Labels

Comments

@legacy-carlostorrao
Copy link

Hi, i'm having also another issue with the Batch feature of OData.

This feature let us make more than one OData request in a single HTTP POST request.

http://www.odata.org/documentation/odata-v2-documentation/batch-processing/

Basically, when I use the batch functionality with only one request in the POST body, it works. But when I use more than one request in the POST body, it occurs one exception of duplicate insert in the dictionary "HttpContext.Current.Items.Add("ODataQueryOperation.Current", operation)" that is present in class "Microsoft.Data.Services.Toolkit.QueryModel.ODataQueryProvider".

To solve this, I simple removed that line, because I noticed that is not used by nothing else.

Best regards,
Carlos Torrão

@legacy-carlostorrao
Copy link
Author

I forget to tell another correction related with this issue in class "Microsoft.Data.Services.Toolkit.QueryModel.ODataContext".

public IQueryable CreateQuery() { if (!_queryableTypeNames.ContainsKey(typeof(T).FullName)) _queryableTypeNames.Add(typeof(T).FullName, typeof(T).AssemblyQualifiedName);
        return new ODataQuery<T>(new ODataQueryProvider<T>(this.RepositoryFor));
    }

I also had to add an IF to check if the _queryableTypeNames had already the key.

@ghost ghost assigned oising Jun 24, 2013
@oising
Copy link
Owner

oising commented Jun 24, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants