blaze-persistence icon indicating copy to clipboard operation
blaze-persistence copied to clipboard

Custom id mapping leads to startup error

Open beikov opened this issue 3 years ago • 0 comments

A mapping like

@EntityView(Link.class)
public interface LinkView extends Id {
    @IdMapping("this")
    @JsonIgnore
    Id getId();

    @EntityView(Link.class)
    public interface Id {
        String getName();
        String getUrl();
    }
}

Fails with

Caused by: java.lang.IllegalArgumentException: There are error(s) in entity views!
Invalid id attribute mapping for embeddable entity type 'com.daniel.test.domain.Link' at attribute id[com.daniel.test.view.LinkView.getId] for managed view type 'com.daniel.test.view.LinkView'!
Invalid id attribute mapping for embeddable entity type 'com.daniel.test.domain.Link' at attribute id[com.daniel.test.view.LinkUpdateView.getId] for managed view type 'com.daniel.test.view.LinkUpdateView'!

See here for details: https://github.com/Blazebit/blaze-persistence/issues/1442

beikov avatar Feb 07 '22 14:02 beikov