How to use enums with JPA

前端 未结 11 1078
梦如初夏
梦如初夏 2020-12-03 02:47

I have an existing database of a film rental system. Each film has a has a rating attribute. In SQL they used a constraint to limit the allowed values of this attribute.

11条回答
  •  遥遥无期
    2020-12-03 03:14

    Sounds like you need to add support for a custom type:

    Extending OracleAS TopLink to Support Custom Type Conversions

提交回复
热议问题