ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Osman <andrew.os...@gmail.com>
Subject DataMapper 3.0 doesn't support <generate> tag
Date Wed, 05 May 2010 19:54:17 GMT
I have a statement in my map file as follows:

    <update id="UpdateAccount" parameterMap="UpdateAccountPM">
      <generate table="v_Account" by="AccountID"/>
    </update>

however, when I run the program, create and configure the engine and call
DefaultConfigurationEngine.BuildMapperFactory() I get the following
exception:

*String object should not be empty when retrieving argument commandText
using statement 'UpdateAccount' in PreparedStatementFactory constructor*

I believe this is happening due to the fact that there is no 'generate'
handler registered in XmlConfigProcessor.RegisterElementHandlers() in
ibatisnet-3\trunk\src\Apache.Ibatis.DataMapper\Configuration\Interpreters\Config\Xml\Processor\XmlConfigProcessor.cs


I suppose that is because there isn't one implemented.


here's the stack: (if it's helpful)


Apache.Ibatis.Common.DLL!Apache.Ibatis.Common.Contracts.Contract.ThrowAnException(string
message = "String object should not be empty when retrieving argument
commandText using statement 'UpdateAccount' in PreparedStatementFactory
constructor") Line 152 + 0x50 bytes C#
  Apache.Ibatis.Common.DLL!Apache.Ibatis.Common.Contracts.ContractMessage.When(string
message = "retrieving argument commandText using statement 'UpdateAccount'
in PreparedStatementFactory constructor") Line 68 + 0x42 bytes C#
  Apache.Ibatis.DataMapper.DLL!Apache.Ibatis.DataMapper.Model.Statements.PreparedStatementFactory.PreparedStatementFactory(Apache.Ibatis.DataMapper.Session.ISession
session = DataMapperSession: {System.Data.SqlClient.SqlConnection},
Apache.Ibatis.DataMapper.Data.DBHelperParameterCache dbHelperParameterCache
= {Apache.Ibatis.DataMapper.Data.DBHelperParameterCache},
Apache.Ibatis.DataMapper.Scope.RequestScope request =
{Apache.Ibatis.DataMapper.Scope.RequestScope},
Apache.Ibatis.DataMapper.Model.Statements.IStatement statement = Update:
"UpdateAccount", string commandText = "") Line 95 + 0xd1 bytes C#
  Apache.Ibatis.DataMapper.DLL!Apache.Ibatis.DataMapper.Model.Sql.Static.StaticSql.BuildPreparedStatement(Apache.Ibatis.DataMapper.Session.ISession
session = DataMapperSession: {System.Data.SqlClient.SqlConnection}, string
sql = "") Line 105 + 0x2a bytes C#
  Apache.Ibatis.DataMapper.DLL!Apache.Ibatis.DataMapper.Configuration.DefaultModelBuilder.ProcessSqlStatement(Apache.Ibatis.Common.Configuration.IConfiguration
statementConfiguration = Configuration: "update"-"UpdateAccount",
Apache.Ibatis.DataMapper.Model.Statements.IStatement statement = Update:
"UpdateAccount") Line 307 + 0x5f bytes C#
  Apache.Ibatis.DataMapper.DLL!Apache.Ibatis.DataMapper.Configuration.DefaultModelBuilder.BuildUpdate(Apache.Ibatis.Common.Configuration.IConfiguration
statementConfig = Configuration: "update"-"UpdateAccount",
Apache.Ibatis.DataMapper.Configuration.ConfigurationSetting
configurationSetting =
{Apache.Ibatis.DataMapper.Configuration.ConfigurationSetting}) Line 162 +
0xe bytes C#
  Apache.Ibatis.DataMapper.DLL!Apache.Ibatis.DataMapper.Configuration.DefaultModelBuilder.BuildMappedStatements(Apache.Ibatis.DataMapper.Configuration.IConfigurationStore
store = DefaultConfigurationStore,
Apache.Ibatis.DataMapper.Configuration.ConfigurationSetting
configurationSetting =
{Apache.Ibatis.DataMapper.Configuration.ConfigurationSetting}) Line 76 + 0xe
bytes C#
  Apache.Ibatis.DataMapper.DLL!Apache.Ibatis.DataMapper.Configuration.DefaultModelBuilder.BuildModel(Apache.Ibatis.DataMapper.Configuration.ConfigurationSetting
configurationSetting =
{Apache.Ibatis.DataMapper.Configuration.ConfigurationSetting},
Apache.Ibatis.DataMapper.Configuration.IConfigurationStore store =
DefaultConfigurationStore) Line 217 + 0xe bytes C#
  Apache.Ibatis.DataMapper.DLL!Apache.Ibatis.DataMapper.Configuration.DefaultConfigurationEngine.BuildMapperFactory()
Line 209 + 0x21 bytes C#

Mime
View raw message