I don't see how SQL would solve your problem. You have user requested
changes to Entity instances that are not valid. You will need to develop
some mechanism in your application to notify the user and refresh the
user's view. EM.refresh() can rollback the changes to the Entities within
the Persistence Context if that is all you need.
--Gordon