ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuan Tao (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-621) Improper cache create mechanism
Date Wed, 05 Aug 2009 10:47:14 GMT
Improper cache create mechanism

                 Key: IBATIS-621
                 URL: https://issues.apache.org/jira/browse/IBATIS-621
             Project: iBatis for Java
          Issue Type: Bug
    Affects Versions: 3.0.0
            Reporter: Yuan Tao
             Fix For: 3.0.0

My sql map has some ${XXX} tag, no #{..} tag. When execute it with deferent patameterObject
in the one session, It retrurn the same result.

In BaseExecutor :

  public CacheKey createCacheKey(MappedStatement ms, Object parameterObject, int offset, int
limit) {
    BoundSql boundSql = ms.getBoundSql(parameterObject);
    CacheKey cacheKey = new CacheKey();
    cacheKey.update(ms.getId());  // *************  Maybe use  cacheKey.update(boundSql.getSql())
is better.
    List<ParameterMapping> parameterMappings = boundSql.getParameterMappings();
    if (parameterMappings.size() > 0 && parameterObject != null) {

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@ibatis.apache.org
For additional commands, e-mail: dev-help@ibatis.apache.org

View raw message