Lookup replacement should provide notification

Description

The ILookupService.replace(Lookup source, Lookup target) method replaces uses of the source lookup with the target.
The implementation for this bypasses the archetype service - any user that has registered an IArchetypeServiceListener for an archetype affected by the replacement won't receive a notification.
This has implications for caching.

E.g, suppose an act.customerAppointment refers to a lookup.appointmentReason with code "X".
If lookup.appointmentReason "X" is replaced with lookup.appointmentReason "Y", any listener for act.customerAppointment won't be notified of the change.

One drawback of performing notifications, is that it is potentially expensive operation. Each affected object would need to be loaded from the database in order for the notification to occur.
A workaround for this would be to extend IArchetypeServiceListener to provide a "batch" listener notification which simply notifies if a batch of objects of a particular archetype have been saved.
E.g:

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Affects versions

Priority

Minor
Configure