You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Michael Vorburger <mv...@odyssey-group.com> on 2008/07/09 20:03:52 UTC

Stored Procedure support (AKA replace INSERT and UPDATE)

Hello,
 
Does OpenJPA support Stored Procedures, like other ORMs
(TopLink/EclipseLink, Hibernate)? Imagine a DB that exposes Views for
SELECT-ing, and that requires you to call a stored proc for most INSERTs
or UPDATEs. Is there any way to configure (?) something like "When you
persist the X Entity, don't do an INSERT ... INTO X, but CALL ...
something" ? Dito for UPDATE.
 
I realize you can use (named) native queries that do Stored Procedures
for queries, but that's not "transparent" in any way and I don't see how
that could be used to replace INSERT/UPDATE after a persist(), unless
I'm missing something.
 
Reading e.g. https://issues.apache.org/jira/browse/OPENJPA-236 makes me
think that it may be possible to "code" this somehow? Are any OpenJPA
users doing this? Is this a good/bad idea?
 
Is there anything coming / changing with the JPA 2.0 Spec in this space?
 
Thank you,
Michael
 
_____________________________
Michael Vorburger, Odyssey Financial Technologies


____________________________________________________________

� 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.