Pull request https://github.com/hibernate/hibernate-orm/pull/2543 does the same thing but reusing the same code used in other places where placeholders are supported