From 1bce5d63684d0daf457ed5a28bd3b7a1a75c07f5 Mon Sep 17 00:00:00 2001
From: Vincent Massol <vincent@massol.net>
Date: Wed, 17 Oct 2018 12:30:06 +0200
Subject: [PATCH] XDOCKER-80: Missing Notifications new HBM mapping file

---
 10/mysql-tomcat/xwiki/hibernate.cfg.xml    | 1 +
 10/postgres-tomcat/xwiki/hibernate.cfg.xml | 1 +
 9/mysql-tomcat/xwiki/hibernate.cfg.xml     | 2 +-
 9/postgres-tomcat/xwiki/hibernate.cfg.xml  | 2 +-
 template/xwiki/hibernate.cfg.xml           | 5 ++---
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/10/mysql-tomcat/xwiki/hibernate.cfg.xml b/10/mysql-tomcat/xwiki/hibernate.cfg.xml
index 1c69b39..bd0af68 100644
--- a/10/mysql-tomcat/xwiki/hibernate.cfg.xml
+++ b/10/mysql-tomcat/xwiki/hibernate.cfg.xml
@@ -97,6 +97,7 @@
     <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>
+    <mapping resource="notification-filter-preferences.hbm.xml"/>
 
   </session-factory>
 </hibernate-configuration>
diff --git a/10/postgres-tomcat/xwiki/hibernate.cfg.xml b/10/postgres-tomcat/xwiki/hibernate.cfg.xml
index 79549e2..d7ebe10 100644
--- a/10/postgres-tomcat/xwiki/hibernate.cfg.xml
+++ b/10/postgres-tomcat/xwiki/hibernate.cfg.xml
@@ -99,6 +99,7 @@
     <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>
+    <mapping resource="notification-filter-preferences.hbm.xml"/>
 
   </session-factory>
 </hibernate-configuration>
diff --git a/9/mysql-tomcat/xwiki/hibernate.cfg.xml b/9/mysql-tomcat/xwiki/hibernate.cfg.xml
index 1c69b39..3b7ac9d 100644
--- a/9/mysql-tomcat/xwiki/hibernate.cfg.xml
+++ b/9/mysql-tomcat/xwiki/hibernate.cfg.xml
@@ -97,6 +97,6 @@
     <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>
-
+    
   </session-factory>
 </hibernate-configuration>
diff --git a/9/postgres-tomcat/xwiki/hibernate.cfg.xml b/9/postgres-tomcat/xwiki/hibernate.cfg.xml
index 79549e2..7f0949c 100644
--- a/9/postgres-tomcat/xwiki/hibernate.cfg.xml
+++ b/9/postgres-tomcat/xwiki/hibernate.cfg.xml
@@ -99,6 +99,6 @@
     <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>
-
+    
   </session-factory>
 </hibernate-configuration>
diff --git a/template/xwiki/hibernate.cfg.xml b/template/xwiki/hibernate.cfg.xml
index 56b0d36..4b7d484 100644
--- a/template/xwiki/hibernate.cfg.xml
+++ b/template/xwiki/hibernate.cfg.xml
@@ -118,8 +118,7 @@
     <mapping resource="feeds.hbm.xml"/>
     <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
-    <mapping resource="mailsender.hbm.xml"/>'''
-    %>
-
+    <mapping resource="mailsender.hbm.xml"/>''' %>
+    <% if (!xwikiVersion.startsWith('9.')) println '<mapping resource="notification-filter-preferences.hbm.xml"/>' %>
   </session-factory>
 </hibernate-configuration>
-- 
GitLab