[eclipselink-users] disabling and enabling a customizer
I used Shaun's blog tip to filter an association using a customizer (thanks Shaun).http://onpersistence.blogspot.com/2008/01/customizing-eclipselink-jpaorm.html
As the next step I want to enable and disable this customizer programmatically. The use case is the following:
- three entities: Schedule, ScheduleVersion and Event
- Schedule has many ScheduleVersion(s) and each ScheduleVersion has many Event(s).
- When I query for a Schedule, I only want to see the latest version of the Event list (filtering customizer works great here).
- When I delete a Schedule, sometimes I want to delete just the latest version and sometimes all the versions (here I was thinking may be disable the customizer and reload/delete the Schedule and re-enable the customizer programmatically).
Is there another way?