option A. entity A : entity B :: 1:n direct SQL to db removes one B. invalidate global instance cache using the JMX cache service, calling remove on the PK of B. The object is removed, but the entity A.getBs() still returns the B. If I do a remove thru entity B's interface instead of direct SQL remove, the CMR A->B is updated correctly.
So question is: direct SQL with caching option A, followed by invalidation thru JMX MBean for that entity bean group, needs programmer to update the CMR relations that connect to the removed bean, or is there some way around? I would rather prefer having JBoss take care of it automatically somehow for me. I want option A, and I still want the ability to do direct SQL followed by cache invalidation