Combining JAXB and JPA in one model

前端 未结 3 512
春和景丽
春和景丽 2020-12-31 03:42

I have to design a data model (in a Java EE 6 application) that will be persisted via JPA, and that also needs to be serialized via JAXB. The last time I did that, I had one

3条回答
  •  耶瑟儿~
    2020-12-31 04:00

    DataNucleus allows persistence using JPA to RDBMS (using JDBC behind the scenes) and XML (using JAXB behind the scenes). It can interprete your JPA annotations as defining how the JAXB serialisation is performed - you could add JAXB annotations too if you so wished

提交回复
热议问题