cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Upgrading from 1.1/1.2/2.0 DataContext.WILL_COMMIT to 3.x
Date Fri, 13 Sep 2013 18:32:13 GMT
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.

Mime
View raw message