You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@table(value = "VEHICLE_JSON")
public class VehicleJSON { @id
private Long id; @column("JSON_DATA_VEHICLE")
private javax.json.JsonObject jsonObject;
}
I am getting the exception:
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT "JSON_VALUE"."VALUE_TYPE" AS "VALUE_TYPE", "JSON_VALUE"."VEHICLE_JSON_KEY" AS "VEHICLE_JSON_KEY" FROM "JSON_VALUE" WHERE "JSON_VALUE"."JSON_DATA_VEHICLE" = ?]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
It works fine when using a POJO class to map the Database JSON column, but fails when using a generic JsonObject like JSON-P. It's considering JsonObject as a table.
I am using Oracle 21c database. I have attached the full stack trace for reference stack.txt
The text was updated successfully, but these errors were encountered:
There is no JSON support yet. See #509.
Spring Data JDBC considers JsonObject just another entity, and tries to map it and its properties to a table and columns.
My Entity Class is as follows:
@table(value = "VEHICLE_JSON")
public class VehicleJSON {
@id
private Long id;
@column("JSON_DATA_VEHICLE")
private javax.json.JsonObject jsonObject;
}
I am getting the exception:
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT "JSON_VALUE"."VALUE_TYPE" AS "VALUE_TYPE", "JSON_VALUE"."VEHICLE_JSON_KEY" AS "VEHICLE_JSON_KEY" FROM "JSON_VALUE" WHERE "JSON_VALUE"."JSON_DATA_VEHICLE" = ?]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
It works fine when using a POJO class to map the Database JSON column, but fails when using a generic JsonObject like JSON-P. It's considering JsonObject as a table.
I am using Oracle 21c database. I have attached the full stack trace for reference
stack.txt
The text was updated successfully, but these errors were encountered: