ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Hanson" <mnbo...@gmail.com>
Subject Re: stored procedure parameter maps
Date Mon, 20 Nov 2006 19:54:51 GMT
One more related question. Is it possible to make "Section 3.5.12 Complex
Collection Properties" work with stored procedures? I'm currently receive a
configuration error with a mapping that looks like:
<result property="RecordingDocuments" column="PackageNumber"
select="SelectRecordingDocumentByPackageNumber" />

SelectRecordingDocumentByPackageNumber uses a stored procedure and that's
the only thing I can guess is wrong. If I remove the line that tries to map
the list, everything works fine. Here is the error and partial stack trace:

IBatisNet.Common.Exceptions.ConfigurationException was unhandled
  Message="
- The error occurred while loading SqlMap.
- initialize result property: RecordingDocuments
- The error occurred in <sqlMap resource=\"Maps/RecordingPackage.xml\"
xmlns=\"http://ibatis.apache.org/dataMapper\" />.
- Check the RecordingPackage.RecordingPackage-result."
  Source="IBatisNet.DataMapper"
  StackTrace:
       at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean
isCallFromDao) in
C:\ibatis\trunk\cs\mapper\IBatisNet.DataMapper\Configuration\DomSqlMapBuilder.cs:line
598
       at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
document, Boolean useConfigFileWatcher) in
C:\ibatis\trunk\cs\mapper\IBatisNet.DataMapper\Configuration\DomSqlMapBuilder.cs:line
698
       at
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String
resource, ConfigureHandler configureDelegate) in
C:\ibatis\trunk\cs\mapper\IBatisNet.DataMapper\Configuration\DomSqlMapBuilder.cs:line
514
       at
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(ConfigureHandler
configureDelegate) in
C:\ibatis\trunk\cs\mapper\IBatisNet.DataMapper\Configuration\DomSqlMapBuilder.cs:line
478


On 11/20/06, Bob Hanson <mnbob70@gmail.com> wrote:
>
> It appears that stored procedure parameter maps must list parameters in
> the same order as the parameters are listed in the stored procedure. Is that
> how it is supposed to work or am I doing something wrong?
>
> Looking at the code, it doesn't appear that the parameter object is used
> at all. Thus it seems that the mapping is ignored. For stored procedure
> parameter maps, what are the attributes "property" and "column" used for?
>
>

Mime
View raw message