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

OData exception (RavenDB) #437

Closed
ben-jacobs opened this issue Apr 23, 2021 · 2 comments
Closed

OData exception (RavenDB) #437

ben-jacobs opened this issue Apr 23, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@ben-jacobs
Copy link

Howdy :)

Pretty sure that And has to be and .... otherwise there's a syntax error thrown by OData.

GrantStore.cs

 protected virtual async Task<TEntity> GetEntityBySubjectAndClient(string subjectId, string clientId)
        {
            return (await _store.GetAsync(new PageRequest
            {
                Filter = $"{nameof(UserConsent.UserId)} eq '{subjectId}' **and** {nameof(UserConsent.ClientId)} eq '{clientId}'"
            }).ConfigureAwait(false)).Items.FirstOrDefault();
        }
@ben-jacobs ben-jacobs added the bug Something isn't working label Apr 23, 2021
@aguacongas
Copy link
Member

This method is under unit test through : UserConsentStoreTest.GetUserConsentAsync_should_call_store_GetAsync and it doesn't throw. But, for coherence, I'll lowered case And

@ben-jacobs
Copy link
Author

Haven't looked at the unit tests - but was definitely throwing with "And" and doesn't throw with "and" ... at least when using the RavenDB driver.

Have been away and just catching up with all the changes. Excellent progress! The library/app is definitely coming together nicely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants