Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Composite id with IdClass annotation #1077

Closed
bala-striva opened this issue Mar 18, 2021 · 2 comments
Closed

Handle Composite id with IdClass annotation #1077

bala-striva opened this issue Mar 18, 2021 · 2 comments

Comments

@bala-striva
Copy link
Contributor

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.

@bartoszwalacik
Copy link
Member

bartoszwalacik commented Mar 21, 2021

It's not a bug, there is no support for IdClass class in Javers. Consider contributing a PR with this new feature

@bartoszwalacik
Copy link
Member

fixed in 6.0.0-RC2

lucas-prestes pushed a commit to lucas-prestes/javers that referenced this issue Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants