ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jorge Perez" <jpe...@investran.com>
Subject default parameter mapping for stored procedures
Date Mon, 12 Mar 2007 21:31:01 GMT
 

Hi, I have the following problem:

 

I have a stored procedure that takes 3 parameters.

 

CREATE Procedure [dbo].[spContactDelete] (@ContactID int, @Caller
varchar(128)=null, @Callerid int=0)

 

I want to map to the above stored procedure without using a hashTable.
In other words without doing this

 

<parameterMap id="OrganizationParameterMap"           class="HashTable">

      <parameter column="ContactID"       property="Id"
type="System.Int32"     />

      <parameter column="Caller"          property="Caller "
type="string"           />

      <parameter column="Callerid"        property="Callerid "
type="string"  />

</parameterMap>
 
I already have an object called Contact which has the ContactID
property, but does not have the other 2 parameters.  
Is there a way that I can just pass the contact object and have ibatis
use the default values? 
 
 
I would like to do something similar to this:
 

int recordsAffected =
mapper.Delete(statementNameBuilder.DeleteStatementName, contact);

 

 

 

thanks

CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary
and privileged information, and unauthorized disclosure or use is prohibited. If you received
this email in error, please notify the sender and delete this email from your system. Thank
you.

Mime
View raw message