Skip to content

EntityDefinition doesn't pick up inherited fields/methods #640

Description

@jamesdbaker

I have some interfaces defined as follows:

public interface WithId {
  String getId();
}

public interface MyObject extends WithId {
  //getId() is inherited
  //Some more methods, properties, etc
}

When I try to register the object (with the following), it fails to detect the id property as expected:

Javers javers = JaversBuilder.javers()
    .withMappingStyle(MappingStyle.BEAN)
    .registerEntity(new EntityDefinition(MyObject.class, "id"))
    .build();

The error I get is: PROPERTY_NOT_FOUND: property 'id' not found in class 'MyObject'

If the getId() method is directly on MyObject, then the code above works as expected. This is using javers-core version 3.7.5.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions