Hi Thomas, very appreciated that you're thinking about a solution. time-wise, unless you help with a patch I don't think we can include this in 4.4 but at least I'll track the need for 5.0
The properties approach is interesting, but EntityManager is not the Session and I'm afraid the way it's structured - being EM a decorator of Session - we have some complexities:
-
properties are stored in the EM, not reachable by Session
-
The eventListener can only grab a reference to Session
-
Even if we could fix the two above issues, we need to find a solution for Hibernate ORM (Session) users as well (not depending on JPA)
If you want to try making a patch I'll be glad to discuss it with you but I fear it might need some chances in ORM too.
|