ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esemba <ese...@gmail.com>
Subject removeFirstPrepend problem - possible bug
Date Sat, 25 Apr 2009 16:51:11 GMT

I've foung weird behavior of dynamic tag. When I have <dynamic> without
prepend attribute, it doesn't strip first child's prepend. I'll post the
truncated code here:

<dynamic>
<isEqual property="searchMetadata" compareValue="true">
   ...
</isEqual>

<isEqual property="searchTypeBetweenMetadataAndFulltextString"
compareValue="OR" prepend="or">
   ...
</isEqual>

<isEqual property="searchTypeBetweenMetadataAndFulltextString"
compareValue="AND" prepend="and">
   ...
</isEqual>
</dynamic>

Here, if property searchMetadata is false and property
searchTypeBetweenMetadataAndFulltextString is equal to "OR", the "or"
prepend should be stripped, but it isn't. I can solve this, if I add
meaningless prepend to dynamic tag, like this: <dynamic prepend="/* foobar
*/">. It looks like the dynamic tag needs to have prepend in order to strip
first child's prepend. I would post a bug report, but don't know if this
isn't some kind of feature or something.

I could post whole code here, but it's really huge select doing fulltext
search, so I've decided for truncated version. I use latest ibatis from
maven repository (version 2.3.4.726).
-- 
View this message in context: http://www.nabble.com/removeFirstPrepend-problem---possible-bug-tp23234083p23234083.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message