Registering Converters in JPA 2.1 with EclipseLink

前端 未结 4 1753
醉酒成梦
醉酒成梦 2021-02-06 16:00

On JavaEE environment, I use JPA 2.1 implementation with EclipseLink,

I have some entities that contain enums. So I have created converters for these enume

4条回答
  •  有刺的猬
    2021-02-06 16:44

    My guess is that you have intermixed javax.persistence and org.eclipse.persistence.annotations packages.

    Using javax.persistence package classes, you may use an empty Converter annotation on the converter class and a Convert annotation on the entity class specifying the converter class.

提交回复
热议问题