ITeye博客

Hibernate3映射到PostgreSQL中遇到的小问题!

DavyLee · 2008-03-17 11:05 · Markdown

前天,我用Hibernate3在PostgreSQL下写了个对一个简单对象(Tag)的CRUD操作,并按照Tag.hbm.xml映射,在Linux下的PostgreSQL里建好了表,PostgreSQL版本不详。但启动服务后日志报错,说authorId找不到,我的Tag.hbm.xml里写的是


<property name="authorId" column="authorId" type="integer" not-null="false" length="10"/>

但表中的确有authorId. 后来,我把表中的字段authorId改为了authorid,映射文件不变,就一切ok了! 另人费解,为什么column="authorId"在PostgreSQL必须对应authorid? 不知道大家是否遇到过类似问题。

评论(1)

  1. #1 楼 · panpan123mail · 2009-11-02 23:35

    postgresql对大小写敏感

评论功能维护中,当前仅展示历史评论。