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 TREAT in entity views #312

Closed
beikov opened this issue Dec 13, 2016 · 1 comment

Comments

@beikov
Copy link
Member

commented Dec 13, 2016

As part of our work on TREAT for #120 we should also add support for treat in entity views. There are actually two features that make sense when adding treat support.

  1. Allow to treat the "current" entity view
    This requires some syntax to refer to the "current" entity view type.

  2. Allow to map an entity view or subview to specific entity view subtypes
    When mapping a subview or applying an entity view it should be possible to specify entity view subtypes that should be materialized when an entity is of the respective entity subtype.

@beikov beikov added the enhancement label Dec 13, 2016

@beikov beikov added this to the 1.2.0 milestone Dec 13, 2016

@beikov beikov self-assigned this Dec 13, 2016

@beikov beikov added the entity-view label Jan 10, 2017

@beikov

This comment has been minimized.

Copy link
Member Author

commented Feb 7, 2017

Actually I'd like to allow to map subview subtypes not only based on entity hierarchy but maybe also based on some kind of other discriminator.
Just saw some code that based on the value of a type property produced different values for a generated property based on different property paths i.e.

public String resolve() {
  switch (type) {
    case TYPE1: return getRelation1().getOwner().getName();
    case TYPE2: return getRelation2().getOwner().getName();
    // ...
  }
}
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 19, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 20, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 24, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 24, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 24, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 26, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 26, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 27, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 27, 2017
beikov added a commit to beikov/blaze-persistence that referenced this issue Apr 27, 2017

@beikov beikov closed this in 8300f03 Apr 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.