You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by "Nabours, Mark A." <MA...@magellanhealth.com> on 2007/11/06 21:08:38 UTC
Optional Stored Procedure Parameters breaks iBatis code
We recently had a portion of our iBatis code broken when the author of
MS SQL Server stored procedure added 3 optional parameters. We had
assumed that iBatis.net would handle this more gracefully. What is the
recommended way for dealing with this? Do you have to specify all of
the parameters even though some of them are optional?
If you do that, will your code break again if the maintainer of the
client's stored procedure removes those optional parameters in the
future? We are currently using version 1.6.1 of IBatisNet.DataMapper.
Thanks,
Mark
RE: Optional Stored Procedure Parameters breaks iBatis code
Posted by "Nabours, Mark A." <MA...@magellanhealth.com>.
Thanks, for your reply. We will give it go.
Thanks,
Mark Nabours
Senior Systems Architect
314-387-5502
All beings tremble before violence. All fear death,
all love life. See yourself in others. Then whom
can you hurt? What harm can you do?
Buddha
________________________________
From: Gilles Bayon [mailto:ibatis.net@gmail.com]
Sent: Friday, November 16, 2007 3:39 PM
To: user-cs@ibatis.apache.org
Subject: Re: Optional Stored Procedure Parameters breaks iBatis code
We recently had a portion of our iBatis code broken when the author of
MS SQL Server stored procedure added 3 optional parameters.
We had assumed that iBatis.net would handle this more gracefully.
What is the recommended way for dealing with this?
> Try to specify useDeriveParameters="false" on the SQL server provider
in the provider.config file. Be aware that as the parameters metatdata
are no more discovered you will have to specify the some as direction
for ouput parameter.
Do you have to specify all of the parameters even though some of them
are optional?
> yes if you use the useDeriveParameters=true as iBATIS discover the
parameters using the store procedure metadata which retrieve ALL the
parameters.
If you do that, will your code break again if the maintainer of the
client's stored procedure removes those optional parameters in the
future?
> yes, as if your change the signature of a .NET method
--
Cheers,
Gilles
<a href="http://www.linkedin.com/in/sellig">Join my network on
LinkedIn</a>
Re: Optional Stored Procedure Parameters breaks iBatis code
Posted by Gilles Bayon <ib...@gmail.com>.
We recently had a portion of our iBatis code broken when the author of MS
SQL Server stored procedure added 3 optional parameters.
We had assumed that iBatis.net would handle this more gracefully.
What is the recommended way for dealing with this?
> Try to specify useDeriveParameters="false" on the SQL server provider in
the provider.config file. Be aware that as the parameters metatdata are no
more discovered you will have to specify the some as direction for ouput
parameter.
Do you have to specify all of the parameters even though some of them are
optional?
> yes if you use the useDeriveParameters=true as iBATIS discover the
parameters using the store procedure metadata which retrieve ALL the
parameters.
If you do that, will your code break again if the maintainer of the client's
stored procedure removes those optional parameters in the future?
> yes, as if your change the signature of a .NET method
--
Cheers,
Gilles
<a href="http://www.linkedin.com/in/sellig">Join my network on LinkedIn</a>