Hi, 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# </isNotNull> </isNotNull> </dynamic> ... 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.