表列名

来源:互联网 发布:羊绒围巾推荐知乎 编辑:程序博客网 时间:2024/04/27 19:02

1.mysql5.5

  在一个表中一个列取名userName,

在hibernate映射文件,

<property name="singerName" type="string">
            <column name="singerName" length="20" not-null="true" />
        </property>

 

结果用hql查询不了此表。

把列明改为user_name,

<property name="singerName" type="string">
            <column name="singer_name" length="20" not-null="true" />
        </property>

可以
原创粉丝点击