views:

12

answers:

1

I have the map config file like this

<sqlMap ..............>

    <alias>
      <typeAlias ......../>
    </alias>

    <statements>
      ....
      <sql>....</sql>
      <select cacheModel="cache-select-all">....</select>
      <update>...</update>
      <procedure>...</procedure>
      .....
    </statements>    

    <parameterMaps>
      <parameterMap>....</parameterMap>
    </parameterMaps>

    <cacheModel id="cache-select-all" type="LRU" readOnly="true" serialize="false">
      <flushInterval hours="24"/>
      <flushOnExecute statement="InsertIOs"/>
      <!--<property name="CacheSize" value="1000"/>-->
    </cacheModel>

  </sqlMap>

I am using ibatis (.net, if that matters) and i have one question: where to place the tags? is There a or because placing it like i did, in the statements seems not to work. What am i doing wrong?

A: 

You must reference the cacheModel you defined inside a statement tag as shown in the following link:

http://ibatis.apache.org/docs/dotnet/datamapper/ch03s08.html

Leniel Macaferi
And the correct place to declare <cacheModel> tags is right inside the <sqlMap> tag?
ion
Yes, as you can see in this PDF (page 13) - http://ufpr.dl.sourceforge.net/project/ibatisdb/ibatisdb-2/2.0.9b/iBATIS-SqlMaps-2.pdf
Leniel Macaferi