2

I have a problem with entity versioning. Here's what I want to archive:

Let's say that I have entity class A (POJO with javax.persistance.* annotations). It's in relations with other entities. Then I need to insert new version of A. All rows should still reffer to old one, but it should be marked as archived and new version should be insterted in database.

Is there any generic mechanism for this or should I create some custom Factory for it?

1 Answer 1

4

Before rolling out your own solution, have a look at Hibernate Envers, it might suit your needs.

See also

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.