ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Grabfelder <nos...@kaigrabfelder.de>
Subject Re: removeFirstPrepend problem - possible bug
Date Sun, 26 Apr 2009 09:18:22 GMT
Hi,

this is a bug to me. There is also already a jira issue for this:

https://issues.apache.org/jira/browse/IBATIS-430

If I only had time to fix it ;-(

Regards

Kai

--- Original Nachricht ---
Absender: esemba
Datum: 25.04.2009 18:51
> 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).


Mime
View raw message