Store Postgre specific column using native query

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

Not sure what the @Modifying and @Query annotations are, but they are not Hibernate constructs. Hibernate 6 natively supports JSONB columns, so you can simply map your entity and let us care about storing the correct value.

Edit: have a look at composite aggregate types Hibernate ORM 6.2 - Composite aggregate mappings - In Relation To.