Spring Data JPA Immutable Entity

Viewed 997
1 Answers

No, they are not interchangeable.

For Hibernate you need to use the Hibernate one.

If you use Spring Data modules except Spring Data JPA, i.e. those where Spring Data does the persisting itself you need to use the Spring Data annotation.

In both cases the other annotation will be completely ignored.

Related