java - H2 DB column not found error with non-empty table - Stack Overflow

I am transferring Oracle DB into H2 DB for SpringBoot application local env.And using MODE=Oracle and

I am transferring Oracle DB into H2 DB for SpringBoot application local env.

And using MODE=Oracle and creating tables via JPA Entity classes.

The table which is causing issue is:

GROUP_TABLE
-----------
GROUP_ID
CREATED_AT
CREATED_BY
GROUP_NAME
DELETED

This table is created in h2 db and the query I am running is:

SELECT GROUP_ID, GROUP_NAME FROM GROUP_TABLE WHERE DELETED='N' ORDER BY GROUP_NAME;

I am calling GROUP_TABLE repository via REST API and when calling the API with empty table, I am getting correct result with empty data. But when I try to call the API with some data in table then I am getting error:

.h2.jdbc.JdbcSQLSyntaxErrorException: Column "CREATED_AT" not found [42122-232]

The query is running successfully on H2 console with either empty or non-empty table.

I tried deleting CREATED_AT column but now the error is for CREATED_BY column.

I have verified case-sensitivity for table and column names but still can understand what could be the issue.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744146368a4560442.html

相关推荐

  • java - H2 DB column not found error with non-empty table - Stack Overflow

    I am transferring Oracle DB into H2 DB for SpringBoot application local env.And using MODE=Oracle and

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信