Hi Christophe, So, you are attempting to use the Temporal support for DB2? That's pretty cool. We had entertained that support a some time ago, but updating the JPQL is a killer. Once we update the JPQL then we've broken the standard as defined by the specification. So, integrating the Temporal support directly into the Java object model and the associated JPQL was deep-sixed... At least until this becomes back of the JDBC/SQL standard.
So, in the mean time, I would suggest using native SQL instead of attempting to use JPQL. When using native SQL, OpenJPA just puts on the blinders and passes the SQL through to the backend database. The OpenJPA manual [1] touches on this native SQL support. But, you may also want to reference the specification [2] and/or the Pro JPA 2 book [3] for more information. Good luck, Kevin [1] http://ci.apache.org/projects/openjpa/trunk/docbook/manual.html#jpa_overview_sqlquery [2] https://jcp.org/aboutJava/communityprocess/final/jsr317/ [3] http://www.amazon.com/Pro-JPA-2-Mike-Keith/dp/1430249269 On Wed, May 14, 2014 at 2:50 AM, Christophe Marcourt <christo...@marcourt.ch > wrote: > Hello, > > I'm using a DB2 native functionality for the historic. > As the query are proprietary : select * from <table_name> *for system_time > between* <from_date> *and *<to_date> where <where_clause>... I had to use > pure SQL. > > I'm having a problem as JPQL parser can't parse this query. The "for > system_time between ... and ..." is not known by JQPL. > > Is there a way to override, intercept or listen this parsing ? > > What is the object to use DBDictionary, JPQLParser, else ? > > Thank you for your help. > > Christophe Marcourt >