Using hibernation using JPA annotations, you can create a class that can be used by both JAXB for sorting and undoing, and for Hibernate to save.
If you are trying to keep two strictly separate — that is, you don’t want the JPA annotations and JAXB annotations to coexist in the same class — then you will need to map them between the two.
source
share