快捷导航

hibernate的注解和映射文件一起设置一个属性,是按谁说的算呢

想请大神帮我解答下hibernate的注解和映射文件一起设置一个属性,是按谁说的算呢

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员2

根据hibernate的文档,应该是不可以为一个类即用注解有用映射文件进行配置

You can however not declare a class several times (whether annotated or through hbm.xml). You cannot mix configuration strategies (hbm vs annotations) in an entity hierarchy either.
回复

使用道具 举报

是恶魔说的算
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP