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

Disallow IDbFunction.HasTranslation when mapping the function to a TVF #20163

Closed
smitpatel opened this issue Mar 4, 2020 · 1 comment · Fixed by #20315
Closed

Disallow IDbFunction.HasTranslation when mapping the function to a TVF #20163

smitpatel opened this issue Mar 4, 2020 · 1 comment · Fixed by #20315
Assignees
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@smitpatel
Copy link
Member

smitpatel commented Mar 4, 2020

Since TVFs are UDFs (does not map to built-in methods), having to customize translation becomes less useful. (Also parameters would be in same order too). We will throw error in model validation if IDbFunction is IsQueryable, then configuring custom translation will throw exception.

Currently it assumes that a scalar SQL will come out. If we are planning to use same IDbFunction for queryable functions too then it needs rework or breaking change.

@ajcvickers ajcvickers added this to the 5.0.0 milestone Mar 13, 2020
@smitpatel smitpatel changed the title IDbFunction.HasTranslation API needs improvement Disallow IDbFunction.HasTranslation when mapping the function to a TVF Mar 13, 2020
@smitpatel
Copy link
Member Author

@AndriySvyryd @ajcvickers - Looking at API, I decided to throw exception when using API directly rather than deferring to model validator. There is no step which can correct invalid configuration once API is called. Explicit throws, other configuration sources will not set custom translation and return null.

@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Mar 17, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0, 5.0.0-preview3 Mar 31, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0-preview3, 5.0.0 Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants