Skip to content

Javers' annotations should have priority over JPA annotations #539

@bartoszwalacik

Description

@bartoszwalacik

test case:

    @javax.persistence.Entity
    @org.javers.core.metamodel.annotation.ValueObject
    class AmbiguousValueObjectType {
        @Id int id
    }

    @javax.persistence.Embeddable
    @org.javers.core.metamodel.annotation.Entity
    class AmbiguousEntityType {
        @Id int id
    }

    def "should use javers type annotations first, when ambiguous type mapping"(){
        expect:
        typeFactory.inferFromAnnotations(AmbiguousEntityType) instanceof EntityType
        typeFactory.inferFromAnnotations(AmbiguousValueObjectType) instanceof ValueObjectType
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions