PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-38244

Remove DAOParamUtil.getLike() to prevent double % wrapping database queries

    Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      15
    • Similar Issues:
      Show 5 results 

      Description

      For keywords database searching, in the backend we already use CustomSQL.keywords to add %% around terms.
      Using DAOParamUtil.getLike() add %% in the frontend will cause we are searching for %%term%%.

      From now on, we should always add this in the backend to be consistent.

        Activity

        Hide
        Lu Liu added a comment - - edited

        PASSED Manual Testing following the steps in the comment.

        Reproduced on:
        Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: bd7f23480433e6f05a84d4b9d5b3bc40fda49e1e.

        From the SQL log, you can find the sentence with " Group_.name LIKE '%%liferay%%' OR Group_.name LIKE '%%guest%%' OR '%%liferay%%' IS NULL".

        Fixed on:
        Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 809a385011aff335ea7f3c61f48b4e13172f5fee.
        Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: fa4ef4479f2814b1d2f061342b5e788a1a7c3442.

        From the SQL log, you can find sentence with "Group_.name LIKE '%liferay%' OR Group_.name LIKE '%liferay%' OR '%liferay%' IS NULL".

        Show
        Lu Liu added a comment - - edited PASSED Manual Testing following the steps in the comment. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: bd7f23480433e6f05a84d4b9d5b3bc40fda49e1e. From the SQL log, you can find the sentence with " Group_.name LIKE '%%liferay%%' OR Group_.name LIKE '%%guest%%' OR '%%liferay%%' IS NULL". Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 809a385011aff335ea7f3c61f48b4e13172f5fee. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: fa4ef4479f2814b1d2f061342b5e788a1a7c3442. From the SQL log, you can find sentence with "Group_.name LIKE '%liferay%' OR Group_.name LIKE '%liferay%' OR '%liferay%' IS NULL".

          People

          • Assignee:
            Lu Liu
            Reporter:
            Shuyang Zhou
            Recent user:
            Esther Sanz
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 31 weeks, 5 days ago

              Development

                Structure Helper Panel