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

Add a way to set the Kind from Embeddable #164 #165

Closed
wants to merge 1 commit into from

Commits on Aug 7, 2017

  1. Add a way to set the Kind from Embeddable sai-pullabhotla#164

    We have this use case where we use a Wrapper that embed a generic
    object in one of its field.
    
    ```
    @entity
    public class Wrapper {
    
       @Embedded
       private Interface content;
    
       ...
    }
    ```
    
    The content can be of any subtype of Interface (some of them will be
    outside of our control) and the ```Kind``` value can change with any of
    these subtypes.
    
    This Pull Request allow a developer to provide an ```Embeddable``` class
    that will override the ```Kind``` of the enclosing ```Entity```.
    
    It will look like this:
    
    ```
    @embeddable
    @OverrideKind(kind = "mycontent")
    public class MyContent implement Interface {
    
       ...
    }
    ```
    Aurelien Thieriot authored and Aurelien Thieriot committed Aug 7, 2017
    Configuration menu
    Copy the full SHA
    203d57c View commit details
    Browse the repository at this point in the history