I am using @MapKeyColumn(name = "mapkeycolumn", updatable = false) together with @OneToMany. The "updatable = false" leads to the "mapkeycolumn" not being set in the generated sql "update xxx set mapkeycolumn=? where id=?". The JDBC driver throws an error because of the two parameters just one has been set.
This bug has been introduced after Hibernate 5.1.0, which works fine with the very same code.
The OneToManyPersister is configured correctly, having a false at the correct position in the "indexColumnIsSettable" array. In my opinion the update statement should not be issued at all in this case. Offending code: OneToManyPersister#writeIndex(PersistentCollection, Iterator, Serializable, boolean, SharedSessionContractImplementor).