Details
Description
The query in queries.hbm.xml for getSpaceDocsName does not work on PostgreSQL. The error is "ERROR: operator does not exist: boolean <> integer."
I edited the file queries.hbm.xml and placed the edited file in WEB-INF/classes and it fixes the problem. I saw that this bug had been reported a while back with a different method. This same problem occurred with xwiki-1.7.1.
Here is the diff for the changes I made:
file: http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/resources/queries.hbm.xml
— queries.hbm.xml.old 2009-02-06 21:02:53.000000000 -0800
+++ queries.hbm.xml 2009-02-06 21:18:23.000000000 -0800
@@ -4,7 +4,7 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<query name="getSpaceDocsName">
- select distinct doc.name from XWikiDocument doc where doc.space=:space and (doc.hidden <> 1 or doc.hidden is null)
+ select distinct doc.name from XWikiDocument doc where doc.space=:space and (doc.hidden <> TRUE or doc.hidden is null)
</query>
<query name="getAllSpaceDocuments">
select distinct doc.name from XWikiDocument doc where doc.space=:space
@@ -16,7 +16,7 @@
select doc.fullName from XWikiDocument as doc
</query>
<query name="getAllPublicDocuments"> - select doc.fullName from XWikiDocument as doc where (doc.hidden <> 1 or doc.hidden is null)
+ select doc.fullName from XWikiDocument as doc where (doc.hidden <> TRUE or doc.hidden is null)
</query>
<query name="listGroupsForUser">
select doc.fullName from XWikiDocument as doc, BaseObject as obj, StringProperty as prop
Sorry, I don't know the correct escaping for the patch.
Attachments
Issue Links
- is duplicated by
-
XE-394 Xwiki throws exception when trying to export XAR with full history
- Closed
- relates to
-
XWIKI-2928 Regression: searchDocuments fails on PostgreSQL
- Closed
-
XWIKI-2843 Support for hidden documents
- Closed