想請大神幫我解答下hibernate的注解和映射文件一起設(shè)置一個(gè)屬性,是按誰說的算呢
2 回答

yanrun
TA貢獻(xiàn)317條經(jīng)驗(yàn) 獲得超240個(gè)贊
根據(jù)hibernate的文檔,應(yīng)該是不可以為一個(gè)類即用注解有用映射文件進(jìn)行配置
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.
添加回答
舉報(bào)
0/150
提交
取消