openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: replacing sql?...
Date Mon, 24 Aug 2009 16:56:53 GMT
Hi,
Updating an Entity in the @prepersist or @preupdate method is permitted.
This was previously discussed on the dev forum [1] with the JIRA [2]
resolved for the 1.2.x, 1.3.x, and trunk branches.  Are you finding that
this support is not working for you, or were you just asking the question?

These type of updates to the Entity will affect the sql that is generated.
But, I agree with Jody that OpenJPA does not allow direct manipulation of
the generated sql.

Kevin

[1]
http://n2.nabble.com/Updates-to-entities-via-Lifecycle-callback-methods-td1110631.html
[2]  https://issues.apache.org/jira/browse/OPENJPA-732

On Mon, Aug 24, 2009 at 11:40 AM, aaaaaa <aaaaaa@trash2009.com> wrote:

>
> for example, when I delete User entity I need to set active = false ,
> instead
> of actually deleting the record.
>
>
>
>
> Jody Grassel wrote:
> >
> > I don't think that the SQL generated by OpenJPA entitymanager operations
> > can be directly modified.  What sort of modifications are you looking
> > for?  There might be supported function to direct OpenJPA to create the
> > sort of SQL that you are looking for.
> >
> > On Sun, 2009-08-23 at 19:35 -0500, aaaaaa wrote:
> >> hi all,
> >> can I change sql statement which is about to be executed at @prepersist?
> >> thanks,
> >>
> >> Alex.
> >>
> >
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/replacing-sql-tp3500738p3504648.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

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