Details
-
New Feature
-
Resolution: Solved By
-
Major
-
None
-
4.2
-
None
-
Unknown
-
Description
I'd like to cover 2 use cases at once:
- Ability for a platform module to contribute Hibernate mappings (static)
- Ability for an extension installed at runtime to contribute Hibernate mappings (dynamic)
The solution is to:
- Step 1: Create a new Hibernate Configuration instance with all the mappings (old + new)
- Step 2: Create a new SessionFactory by calling myconf.buildSessionFactory()
- Step 3: Modify all code so that no code caches the SessionFactory and instead always call an XWiki component to retrieve the Session Factory
I'd like to reorganize a bit the work stared by Artem with the HibernateSessionFactory role.
Attachments
Issue Links
- duplicates
-
XWIKI-19932 Injecting custom table in the hibernate mapping from an installed extension is too complex
- Open