HHH-9392: SQLGrammarException while executing a EntityGraph

Currently, I am testing EntityGraphs with Hibernate and I found a bug. I created a Testcase which I contribute it as a pull request.