ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Riebeek" <Nick.Rieb...@gov.ab.ca>
Subject Dynamically Selecting a Stored Procedure
Date Wed, 25 Jan 2006 23:15:05 GMT
Hello,

 

Just wondering if what I am attempting is at all possible, I am trying
to dynamically select a stored procedure in my mapping file as below:

 

<procedure id="Inventory.Select" 

                   resultMap="Inventory.SelectResult" 

                  parameterMap="Inventory.ParameterMap" >

                  <dynamic>

                        <isNotEmpty property="EffectiveDate">

                              dbo.SelectInventoryFromHistory

                        </isNotEmpty>

                        <isEmpty property="EffectiveDate">

                              dbo.SelectInventoryFromCurrent

                        </isEmpty>

                  </dynamic>

            </procedure>

 

The problem I am running into is that it appears the parameterMap is not
being populated when I add the <dynamic> tag and therefore I get an
ArgumentOutOfRange exception because iBatis is trying to retrieve the
values from the Parameter Map but no Parameter Map has been loaded.

 

Is there a way that I can specify an inline parameter map with a stored
procedure call?

 

 

Thanks,

 

 

Nick

This communication is intended for the use of the recipient to which it is addressed, and
may contain confidential, personal and or privileged information. Please contact us immediately
if you are not the intended recipients of this communication, and do not copy, distribute,
or take action relying on it. Any communication received in error, or subsequent reply, should
be deleted or   destroyed.


Mime
View raw message