When using a ORM like hibernate it is always a good idea to check what SQL is generated/executed. This is how you enable a log of the SQL executed on the MySQL/MariaDB server:
First line sets output to file, can also output to table. Second line defines location of output file. 3rd enables the SQL log output.