开发者社区> 问答> 正文

Hibernate POJO Oracle数据库关键字问题?报错

Hibernate POJO Oracle数据库关键字问题

 

    @Column(name = "CONTENT", length = 500)
    public String getContent() {
        return this.content;
    }

    public void setContent(String content) {
        this.content = content;
    }

 

会报错

Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "RECORD": 标识符无效

展开
收起
爱吃鱼的程序员 2020-06-05 14:35:28 527 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>标识符无效,是因为不存在该字段。</p> 
    

    标识符如果是保留字,则用单引号quote住就可以了。

    2020-06-05 14:35:43
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_樊文凯_ORACLE数据库和应用异构迁移最佳实践 立即下载
PostgresChina2018_王帅_从Oracle到PostgreSQL的数据迁移 立即下载
Oracle云上最佳实践 立即下载

相关镜像