【问题标题】:iBatis .net with Sqlite causes array out of bounds带有 Sqlite 的 iBatis .net 导致数组越界
【发布时间】:2013-01-02 10:54:18
【问题描述】:

我将 ibatis .net 与 sqlite 一起用于 ORM。但是,每当我拨打以下电话时

IList clientList = mapper.QueryForList("ClientFirm.GetClientData", "A");

我收到以下错误:

消息“索引超出了数组的范围。”

这里是堆栈跟踪:

在 IBatisNet.DataMapper.TypeHandlers.CharTypeHandler.GetValueByName(ResultProperty 映射,IDataReader dataReader) 在 IBatisNet.DataMapper.Configuration.ResultMapping.ResultProperty.GetDataBaseValue(IDataReader dataReader) 在 IBatisNet.DataMapper.MappedStatements.PropertyStrategy.DefaultStrategy.Get(RequestScope 请求,IResultMap resultMap,ResultProperty 映射,Object& 目标,IDataReader 阅读器) 在 IBatisNet.DataMapper.MappedStatements.PropertyStrategy.DefaultStrategy.Set(RequestScope 请求,IResultMap resultMap,ResultProperty 映射,对象和目标,IDataReader 阅读器,对象键) 在 IBatisNet.DataMapper.MappedStatements.ResultStrategy.GroupByStrategy.Process(RequestScope 请求,IDataReader& 阅读器,对象 resultObject) 在 IBatisNet.DataMapper.MappedStatements.ResultStrategy.MapStrategy.Process(RequestScope 请求,IDataReader& 阅读器,对象 resultObject) 在 IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForList(RequestScope 请求,ISqlMapSession 会话,对象 parameterObject,IList resultObject,RowDelegate rowDelegate) 在 IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForList(ISqlMapSession 会话,对象参数对象) 在 IBatisNet.DataMapper.SqlMapper.QueryForList(String statementName, Object parameterObject) 在 d:\Users\ae08964\ATNSource\ATN-AttorneyNetwork\trunk\ATN\App_Code\com\ubs\atn\model\admin\IBatisMapper.cs:line 67 中的 IBatisMapper.getAllClientData()

如果数据集在 50 到 100 左右,它工作正常,但对于超过 100(大约)的任何东西都失败。有人有想法吗?

【问题讨论】:

    标签: c# sqlite orm ibatis ibatis.net


    【解决方案1】:

    想通了..它必须对映射对象中声明的 Char 类型做一些事情。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-03
      • 2011-06-23
      • 1970-01-01
      相关资源
      最近更新 更多