ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esemba <ese...@gmail.com>
Subject dynamic prepend problem
Date Mon, 30 Mar 2009 18:44:42 GMT

I have this sql map:
<dynamic prepend="union">
   <isNotNull property="queryFulltext" removeFirstPrepend="false">

      select theses.id as id,
      where theses_documents.index @@ to_tsquery('cs', #queryFulltext#)

      <isNotNull property="categoryId" prepend="and">
         theses_categories.id = #categoryId#

This sql map throws me an sytax error.
When I check SQL code ibatis has generated, i can see, that last prepend
(AND) is not generated.So the query looks like:

where theses_documents.index @@ to_tsquery('cs', #queryFulltext#)    
[HERE SHOULD BE AND, BUT ISN'T]        theses_categories.id = #categoryId#

Can somebody show me a direction? I have read carefuly the definitions in
Ibatis in action (when the prepends are included and when not), but can't
understant why this happens. Thank you.
View this message in context: http://www.nabble.com/dynamic-prepend-problem-tp22790132p22790132.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message