In myBatis 3, how do you compare a row when using dynamic sql?
Using iBatis earlier, you could do the following:
<isEqual property="sortBy" compareValue="portfolio_id">order by p.portfolio_id</isEqual>
Now with myBatis you can do the following:
<if test="sortBy.equals('facility_id')"> order by pd.facility_id </if>
sortBy is a property in the parameter map, and "facility_id" is a value
I'm a little confused because it was right in the ibatis.
ibatis mybatis
kkudi
source share