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
评论列表(0条)