我一个表里用了多对一: user.hbm.xml
<many-to-one name="sration"
class="org.yao.Srporation"
column="userId"
></many-to-one>
所以这个xml文件中没了userId字段,但我要查这个user表中所有userid为5的记录怎么查呀!
我这样写了不得行:select * from user as s where s.userid=5说这个xml文件中没有userid这个字段
<many-to-one name="sration"
class="org.yao.Srporation"
column="userId"
></many-to-one>
所以这个xml文件中没了userId字段,但我要查这个user表中所有userid为5的记录怎么查呀!
我这样写了不得行:select * from user as s where s.userid=5说这个xml文件中没有userid这个字段
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货