Skip to content

registerEntity ignored when @Id is also defined #142

@erikgollot

Description

@erikgollot

My problem is that I need to store the two versions of an Entity. So each one has a specific value for its @id field. The real identity of my entities is the field businessIdentity. So I tried to register my entities with the following code

EntityDefinition def = new EntityDefinition(PersistentEntity.class,"businessIdentity");
builder.registerEntity(def);
Javers javers = builder.build();

The problem is that Javers (I look with the debugger), always take my @id field as the object identity.

Do I miss something ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions