Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-3208

getSpaceDocsName does not work with postgresql

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.8 RC1
    • 1.8 M2
    • Storage
    • None
    • OS X 10.5.5, java version "1.6.0_07", postgresql 8.3.4

    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

          Activity

            People

              sdumitriu Sergiu Dumitriu
              daveb Dave Burklund
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: