Hello,

Is there any way (API; internal is fine..) to dynamically "intercept" a
SQL query (AFTER it has been generated from JPQL) and modify it slightly
(e.g. do a simple string replace on a table name by another one), just
before it's sent down to the DB through the JDBC connection?

I know about the JDBCListener, but that's a "one way street" - or is it
not?  There is probably something else?

This would be a perfect solution for us for the use case described by
Yann; and there is other use cases where this could be very handy.

Thanks a ton,
Michael


-----Original Message-----
From: Pinaki Poddar [mailto:ppod...@apache.org] 
Sent: mardi, 13. janvier 2009 05:21
To: users@openjpa.apache.org
Subject: Re: Mapping a temporary table


Consider Native Query that is dynamically constructed with temporary
table name + appropriate ResultSetMapping that pours the projections of
SQL query to your Entity class.
 
--
View this message in context:
http://n2.nabble.com/Mapping-a-temporary-table-tp2133474p2149510.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


____________________________________________________________

• This email and any files transmitted with it are CONFIDENTIAL and intended
  solely for the use of the individual or entity to which they are addressed.
• Any unauthorized copying, disclosure, or distribution of the material within
  this email is strictly forbidden.
• Any views or opinions presented within this e-mail are solely those of the
  author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
• An electronic message is not binding on its sender. Any message referring to
  a binding engagement must be confirmed in writing and duly signed.
• If you have received this email in error, please notify the sender immediately
  and delete the original.

Reply via email to