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

Cosmos: Add IS_DEFINED() function to cosmos provider #27344

Closed
wants to merge 4 commits into from

Conversation

RaymondHuy
Copy link
Contributor

Resolve #17722

@RaymondHuy RaymondHuy marked this pull request as draft February 2, 2022 15:43
@RaymondHuy RaymondHuy marked this pull request as ready for review February 2, 2022 15:43
@AndriySvyryd
Copy link
Member

@RaymondHuy Hello!

#17722 Is really about two scenarios: scalar properties and navigations to embedded entities. The latter can be a bit trickier to implement so for now you can throw in that case instead. Also it should be able to handle shadow properties so we'd also need an overload that takes a property name.

I'd like you to add these test cases:

  • IsDefined in a Where call
  • IsDefined in a Select call that creates an anonymous type
  • IsDefined on a shadow property (Person.__id)
  • IsDefined on a derived property (Bird.IsFlightless in InheritanceQueryCosmosTest)
  • IsDefined on an embedded scalar property (OwnedPerson.PersonAddress.Country.Name in OwnedQueryCosmosTest)
  • IsDefined on an embedded reference navigation (OwnedPerson.PersonAddress in OwnedQueryCosmosTest, can throw)
  • IsDefined on an embedded collection navigation (OwnedPerson.Orders in OwnedQueryCosmosTest, can throw)
  • IsDefined on a non-embedded navigation (Person.Orders, should throw)
  • IsDefined on a non-existing property (Person.NonExisting, should throw)
  • IsDefined on a non-mapped property (Person.__jObject, should throw)

@RaymondHuy
Copy link
Contributor Author

@AndriySvyryd Thanks for your response. I will update test cases this weekend ;)

@AndriySvyryd
Copy link
Member

I'm closing this PR since there hasn't been any activity lately. Feel free to submit a new one once you've addressed the above.

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

Successfully merging this pull request may close these issues.

Cosmos: Add support for IS_DEFINED() to EF.Functions
3 participants