Hi,
I have a table that has a JSONB type column.
I would like to insert in it using a native query.
Something like the following
@Modifying
@Query(value = """
INSERT INTO my_table(id1, id2, id3, json_value)
VALUES( :id1, :id2, :id3, :object )
ON CONFLICT ( id1, id2, id3 )
DO UPDATE SET
json_value = :object
""", nativeQuery = true)
void updateById(String id1, String id2, String id3, MyObject object);
I tried the TypedParameterValue like here, but it seems that is not working with native query.
Any help is appreciated.
Cheers