Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 7.1.x
    • Component/s: Core Infrastructure
    • Labels:
      None
    • Type of Documentation:
      Developer: Development Frameworks

      Description

      The custom SQL article here (https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/custom-sql) correctly specifies that the SQL query must be wrapped in a

      <![CDATA[...]]>

      tag. (Same issue on 7.1 article)

      But the example default.xml omits this tag:

      <?xml version="1.0" encoding="UTF-8"?>
      <custom-sql>
          <sql id="com.liferay.docs.guestbook.service.persistence.EntryFinder.findByEntryNameEntryMessageGuestbookName">
              SELECT GB_Entry.*
              FROM GB_Entry
              INNER JOIN 
                  GB_Guestbook ON GB_Entry.guestbookId = GB_Guestbook.guestbookId
              WHERE
                  (GB_Entry.name LIKE ?) AND
                  (GB_Entry.message LIKE ?) AND
                  (GB_Guestbook.name LIKE ?)
          </sql>
      </custom-sql>
      

      The

       <![CDATA[...]]>

      tag must be included. For example, see https://github.com/liferay/liferay-portal/blob/master/modules/apps/blogs/blogs-service/src/main/resources/custom-sql/default.xml

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.1.x