No event is fired on Collection recreate/remove/update action

Description

There is no way today to know if a collection has been updated (in the generic sense of it)
managedEntity.getCollection().add(object)
fires no event.

Seems to me that it should fire Pre/PostUpdateEvent. Because of PostUpdateEvent signature we might need a PostUpdateCollectionEvent (Update meaning Update/Create/Delete)

Environment

None

Activity

Show:
Emmanuel Bernard
May 18, 2007, 2:28 AM

My need for HSEARCH is to
get an event when a collection is changed, and have access the owning entity object.

Ben Dotte
August 29, 2007, 7:34 PM

I have a need for this for the same reason it is needed in Hibernate Search, except I am using the Compass framework to sync changes from Hibernate to the Lucene indexes. Without it, I will need to track down every place we change a persistent collection and manually sync that with Compass, which is less than desirable when all other changes are synced automatically.

Maria Giovanna Bellucci
November 26, 2007, 9:30 PM

We need this event to track every change in a persistent object, including removal of elements in a collection, for a custom security policy. Without it, it's impossible to detect when a collection of values is updated.

Gail Badner
January 29, 2008, 12:25 AM

Committed to trunk / 3.2.

Assignee

Gail Badner

Reporter

Emmanuel Bernard

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure