Skip to content

Handle Composite id with IdClass annotation #1077

Description

@bala-striva

Clear description of my expectations versus reality
With Entities having an IdClass annotation and using other Entities as the id, Javers will use the toString of the id entity and not the id property. This could result in a very long InstanceId.
(See the linked test case for an example)

Steps To Reproduce
I have a **runnable test case ** which isolates the bug and allows Javers Core Team to easily reproduce it. I have pushed this test case to my fork of this repository:

bala-striva@803d6ae

Javers' Version
5.9.4-master

Additional context
With the dehydrate of the composite key values I was able to achieve that the InstanceId to contains only the referenced entities id field and not the toString representation of those entities.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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