You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Yuan Tao (JIRA)" <ib...@incubator.apache.org> on 2009/08/05 12:47:14 UTC
[jira] Created: (IBATIS-621) Improper cache create mechanism
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.
cacheKey.update(offset);
cacheKey.update(limit);
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
[jira] Closed: (IBATIS-621) Improper cache create mechanism
Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/IBATIS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Clinton Begin closed IBATIS-621.
--------------------------------
Resolution: Fixed
Fix Version/s: (was: 3.next)
3.0 Beta 2
Assignee: Clinton Begin
Fixed.
> 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 Beta 1
> Reporter: Yuan Tao
> Assignee: Clinton Begin
> Fix For: 3.0 Beta 2
>
>
> 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.
> cacheKey.update(offset);
> cacheKey.update(limit);
> 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