Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-285

Extra parameter required when getting "answerTo" and "memberOf"

    XMLWordPrintable

Details

    • High

    Description

      see RESTWS-212 for original work.

      As things are now, the URL used for the search MUST include a q parameter, e.g. ?answerTo=<uuid>&q (notice how the parameter is empty). The desired behavior is that there not be a need to have the q parameter when the user doesn't want a name search.

      This can be fixed by adding controller methods for "answerTo" and "memberOf". These methods should create the resource object and call the resource's search routine just like the q parameter does.

      Inside the "doSearch" method, there should be a check for the q parameter, and if it's not present, assign it whatever is the proper value to get the desired behavior.
      There also seems to be a problem in HibernateConceptDAO. In .getCountOfConceptWords, an empty q parameter is replaced by %. In .createConceptWordSearchCriteria:1413, when the % is detected, the words set is given an entry of "%". At :1456, the entry is used for a MatchMode.START restriction, which results in the generation of "LIKE '%%'" by Hibernate. But why should ANY word search criteria be created if q is empty?

      Gliffy Diagrams

        Attachments

          Activity

            People

              Unassigned Unassigned
              r.friedman Roger Friedman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 3 hours
                  3h
                  Remaining:
                  Remaining Estimate - 3 hours
                  3h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified