There have been a few discussions related to this type of function in the
past [1].  In this particular case, I don't remember seeing any results or
patches posted...

[1]
http://n2.nabble.com/How-to-mark-records-for-deleting-without-real-deleting-using-Callback-Methods-tp209333p209333.html

Kevin

On Mon, Jul 6, 2009 at 11:16 AM, Rick Curtis <[email protected]> wrote:

>
> I don't think the @PreRemove annotation will do what you're looking to do.
> I
> assume you want your application to be able to blindly remove an Entity and
> have the logic in your @PreRemove method decide whether or not the remove
> should happen?
>
> I don't see any mention of stopping a remove operation when in a @PreRemove
> method in the JPA spec... but I may be missing something?
>
> -Rick
>
>
> C N Davies wrote:
> >
> > Is there any method in OpenJPA to block entity deletion, I can't find any
> > way to do it?
> >
> >
> >
> > What I want to do is create a @PreRemove method that checks some criteria
> > and either allows the remove process to continue or alternatively reverts
> > to
> > an update method. When I tried to code an update in the @PreRemove method
> > OpenJPA throws an  exception. I can do this in a DAO or a service class
> > but
> > being able to do this within the @PreRemove method looks a little cleaner
> > to
> > me.
> >
> >
> >
> > Thanks J
> >
> >
> >
> > Chris
> >
> >
> >
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/Intercepting-blocking-delete-tp3209946p3213914.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Reply via email to