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

Support COALESCE and CASE WHEN for subview mappings #1188

Open
beikov opened this issue Oct 18, 2020 · 0 comments
Open

Support COALESCE and CASE WHEN for subview mappings #1188

beikov opened this issue Oct 18, 2020 · 0 comments
Labels

Comments

@beikov
Copy link
Member

beikov commented Oct 18, 2020

Currently we only allow simple or treat mappings, see #327

It would be nice though to also support COALESCE and CASE WHEN. All mappings in a subview are then prefixed with that expression. COALESCE is transformed to CASE WHEN in such a case. For e.g. myAttribute we render CASE WHEN parent IS NOT NULL THEN parent.myAttribute ELSE other.myAttribute END. This only works for basic mappings though i.e. it's not possible to fetch entities this way and this should be validated.

I also don't think that that a @Limit mapping can work for something like that. This shouldn't be an issue though, because the individual parts can define a limit by declaring them as @EntityViewRoot.

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

1 participant