Команда postgres работает в pgadmin4, но не в java-коде
String toAdd = "case_data->'business' || '{\"l\":\"cpaz\"}'";
this.orchestrateRepo.updateColumn(toAdd, case_id);
@Query(value = "Update onboarding.onboarding_cases set case_data = jsonb_set(case_data, '{business}', ?1 )where case_id=?2", nativeQuery = true)
void updateColumn(String toAdd, BigInteger case_id);
Я передаю строку в Add, я хочу вставить значение динамически .. но она выдает ошибку
org.postgresql.util.PSQLException: ERROR: function jsonb_set(jsonb, unknown, character varying) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
запрос работает нормально, если я напишу это так
@Query(value = "Update onboarding.onboarding_cases set case_data = jsonb_set(case_data, '{business}', case_data->'business' || '{"t":"cpaz"}' )where case_id=?2", nativeQuery = true)
void updateColumn(BigInteger case_id);
Что мне делать