I solve Hibernate problems by using jOOQ instead. The migration more than paid off the couple times I did it.
I use jOOQ as well, but mostly only for the reading part. For the above case, I still use Hibernate, as I've yet to find an efficient way to do it in jOOQ.