Sanne, I'll have a look into that. And you're right: this might need some changes in the ORM. With them, however, the issues you raised might be solved:
First, Session would need its own properties, which would solve the issue for plain ORM users. Next, EntityManager itself is an interface, which is implemented by Hibernate ORM's EntityManagerImpl. This would allow to implement setProperty(String s, Object o) and pass the property to the session, thus solving the first two issues.
I'll think a bit more on how this could be solved without requiring changes to ORM and I'll also look into the patching process
|