When I started to resolve merge conflicts I realised that hiberante-orm now has already that functionality. IMHO that jira can be closed.