Join GitHub today
JPAQuery.clone: new instance doesn't get original instance templates #1071
As I said in the pull request, clone is also used to attach a fresh, empty JPAQuery to an EntityManager.
This means that when you don't set templates yourself, syntax errors would occur, since it doesn't correctly attach the query anymore.
I'll provide another pull request, which should respect your custom templates.