You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@juddi.apache.org by Jeff Lansing <je...@polexis.com> on 2003/09/17 19:50:05 UTC

[juddi-Users] Broken FindTModelByCategoryQuery

Hi,

I didn't see this one in the bug list.

The following UDDI query:

<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
         <find_tModel generic="2.0" xmlns="urn:uddi-org:api_v2">
            <categoryBag>
               <keyedReference keyName="%" keyValue="categorization" 
tModelKey="uuid:c1acf26d-9672-4404-9d70-39b756e62ab4"/>
            </categoryBag>
         </find_tModel>
      </soapenv:Body>
   </soapenv:Envelope>

generates the following incorrect SQL:

SELECT M.TMODEL_KEY,M.LAST_UPDATE FROM TMODEL M,TMODEL_CATEGORY C WHERE 
M.TMODEL_KEY = C.TMODEL_KEY AND ((C.KEY_NAME = '%' AND C.KEY_VALUE = 
'categorization')) ORDER BY M.LAST_UPDATE DESC

Note that "C.KEY_NAME = '" should be "C.KEY_NAME LIKE '" when name 
contains '%' (but not when '%' is proceeded by '\').

Jeff