-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement
Milestone
Description
Artur Geraschenko opened SPR-15382 and commented
Postgresql has many functional operators such as ?| and ?& (for example https://www.postgresql.org/docs/9.5/static/functions-json.html).
Spring JDBC processing for this case is not correct. When running the following SQL:
select '["3", "11"]'::jsonb ?| '{1,3,11,12,17}'::text[]
... I see exceptions like this:
class org.springframework.dao.InvalidDataAccessApiUsageException
SQL [select '["3", "11"]'::jsonb ?| '{1,3,11,12,17}'::text[]]: given 1 parameters but expected 0
If I use placeholders I see:
class org.springframework.dao.InvalidDataAccessApiUsageException
Not allowed to mix named and traditional ? placeholders. You have 1 named parameter(s) and 1 traditional placeholder(s) in statement: ...
Affects: 4.3.7
Reference URL: #1366
Issue Links:
- Spring JDBC not correctly processing Postgresql ?-contained operator [SPR-13582] #18159 Spring JDBC not correctly processing Postgresql ?-contained operator
- GenericCallMetaDataProvider should not treat 'NULLABLE' column as boolean (for compatibility with latest Postgres driver) [SPR-15333] #19896 GenericCallMetaDataProvider should not treat 'NULLABLE' column as boolean (for compatibility with latest Postgres driver)
- Spring JDBC not correctly processing Postgresql ? operator [SPR-16511] #21054 Spring JDBC not correctly processing Postgresql ? operator
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement