@@ -0,0 +1,650 @@
+package fr.openwide.core.jpa.querydsl;%0A%0Aimport com.querydsl.core.types.Ops;%0Aimport com.querydsl.jpa.HQLTemplates;%0A%0A/**%0A * Adds QueryDSL operators which are specific to PostgreSQL to the default HQLTemplates.%0A * %0A * QueryDSL defines a lot of operators which are not mapped in HQL as they are not supported.%0A * We can define these specific functions/operators here and use this template when creating the JPAQuery.%0A */%0Apublic class PostgreSQLSpecificHQLTemplates extends HQLTemplates %7B%0A%09%0A%09public PostgreSQLSpecificHQLTemplates() %7B%0A%09%09add(Ops.DateTimeOps.WEEK, %22extract(week from %7B0%7D)%22);%0A%09%09add(Ops.DateTimeOps.TRUNC_DAY, %22date_trunc('day', %7B0%7D)%22);%0A%09%7D%0A%0A%7D%0A

Add a QueryDSL templates class to centralize the functions specific to PostgreSQL