We have accumulated quite a bit of code in both utility methods that operate on the level of JPA's Metamodel. For using the meta-model in JPQL queries, we've introduced JpqlUtils that basically duplicates functionality. We should explore whether we could rewrite this functionality based on our mapping-metadata by considering the JPA meta-model as metadata source where required.