Considering the following mapping involving an @Entity with an @ElementCollection of type Map with @Embeddable as value and a declared column of this @Embeddable as Key:
When adding a new "State" class to the Map then Flushing, the number of parameters in the SQL insert
statement does not matches the number of bind parameters. There is one extra
parameter set to null value, which makes the underlaying driver to trigger an
exception (see log below). This has been tested with MariaDB and H2.
Here the test code:
and the output exception :
Linux, openjdk version "11.0.4" 2019-07-16, Ubuntu 4.15.0-55-generic, MariaB / H2