openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C N Davies" <...@cndavies.com>
Subject Intercepting/blocking delete
Date Sun, 05 Jul 2009 07:56:20 GMT
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

 


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