So I'm finally making the attempt to upgrade my ancient Cayenne project from 1.1 to 3.x.
The one kind of compile error I still haven't resolved is registering for a data context commit. I know I can register individual PrePersist, PreRemove, and PreUpdate callbacks for individual entity types, but I don't see how I be notified of with a single DataContext.WILL_COMMIT event once before each context.commit(). I see three problems with trying to use the individual callbacks: - Huge performance hit of being notified for each and every entity committed - Another performance hit of setting up lifecycle notification by iterating through the runtime metadata to register every existing entity type for each of the three pre-commit listeners and - If nothing gets changed by the commit, then I would still get no notification.
