Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace string id feature #614
I need a feature to override tha method called to create the id of the entity.
I have a composite id with entities embbeded. So I created a new annotation to customize Javers to use a defined method not toString Object.
So before Javers created globalId like = 'dummyEntityWithCompositeEmbeddedId/org.javers.core.model.DummyPoint@5b10,1'
and with this new feature I can customize for = 'dummyEntityWithCompositeEmbeddedId/1,2,1'
Here is my pull request #613. Sorry about my last issues. I should read the CONTRIBUTING.md before
Did you tried to implement custom Type Adapter ?
My difficulty isn't the serialization of cdoId. My problem is the serialization of globalId_key field.
My worry is about maintenance of snapshots. I will never can find by globalId_key because it was saved with object reference not with my real values.
I have looked at the PR, why another annotation? If you can add annotation to this class why you cant just fix its
Btw, sometimes you can't modify a class (think about legacy code or libraries code).
I think about more versatile and simpler solution with Function: