openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <>
Subject Re: JPQL and DB2 native code
Date Fri, 16 May 2014 19:22:56 GMT
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

Good luck,


On Wed, May 14, 2014 at 2:50 AM, Christophe Marcourt <
> 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message