https://kotlinlang.org logo
Title
u

user

07/19/2022, 12:21 PM
Custom Spring Data JPA @Query not working for Postgres JsonB I have a Postgres table with a json blob column - CREATE TABLE mytable ( id serial primary key, data jsonb ); With a couple of records - INSERT INTO mytable (id, data) VALUES (1,'{"num": "123", "status": "DRAFT"}'); INSERT INTO mytable (id, data) VALUES (2,'{"num": "456", "status": "LIVE"}'); I'm able to select using the json keys 'num' and 'status' like this - SELECT * FROM mytable WHERE data @> '{"num": "123", "status": "DRAFT"}'; I am trying to put this into a custom query with...