亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

hibernate hql刪除異常

hibernate hql刪除異常

保守愛 2016-03-24 11:40:34
hql語句:dao.executeHql("delete Student As s where s.course.teacher.tno"=tno);錯誤信息:返回sql語句:delete from Per_Student cross join Per_COURSE course1_ where tno=12000002WARN: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cross join Per_COURSE course1_ where tno=12000002' at line 1student關聯course,course關聯teacher,我很好奇怎么delete時沒有關聯到teacher呢,這條hql語句應該是沒有問題的吧?
查看完整描述

1 回答

?
badbomb

TA貢獻16條經驗 獲得超10個贊

where s.course.teacher.tno"=tno

改為where s.course.teacher.tno="+tno

然后你試試

查看完整回答
反對 回復 2016-03-24
  • 保守愛
    保守愛
    不是這個問題,我在這里輸錯了的,程序中確實是這樣..where s.course.teacher.tno="+tno
  • 1 回答
  • 0 關注
  • 3867 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號