ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramon Casha <ramon.ca...@megabyte.net>
Subject Re: [SPAM] - Re: Feature request + patch - Found word(s) removelist list error in the Text body
Date Fri, 12 Aug 2005 05:54:07 GMT
On Thu, 2005-08-11 at 12:07 -0700, Ron Grabowski wrote:
> I think this is an ok idea; but not a good idea. I've had problems in
> the past with trying to use a modified version of class alongside
> unmodified versions:
>  http://forum.castleproject.org/posts/list/39.page
Don't know if it helps but mine has something like this:
#region Property: Connection
public SqlConnection Connection {
	get {
		return _cmd.Connection;
	set {
		_cmd.Connection = value;
IDbConnection IDbCommand.Connection {
	get {
		return Connection;
	set {
		Connection = value as SqlConnection;

> You probably won't experience those errors since you're wrapping the
> class.

No problems so far - it works entirely transparently.

> If I were maintaining a project that required me to use a wrapped
> SqlCommand object, I would expect all related objects for accessing the
> datastore to be wrapped.

Yes but ibatis doesn't use datastores does it?

> Have you thought about putting your modified
> SqlCommand along with other thin wrapper classes into their own
> assembly? 

I could, and that would be a "cleaner" solution, but the only one in
which I want to modify anything is the sqlcommand.

> If you want to specify a fully qualified type
> for one thing, I think you should have to use a fully qualified type
> for everything (i.e. remove the assemblyName attribute entirely).
> That's the approach log4net has taken for its config file.

I'll drink to that.

> I'm curious to know what your SqlCommand wrapper class is doing.

Basically writing a webapp which must adhere to the client's corporate
standards, and one of them is that all database accesses must pass
through their own library. Rather than write an app that is completely
non-standard in its database handling, I created this
drop-in-replacement SqlCommand which shunts the database accesses
through their library, so our application can remain blissfully unaware
of anything unusual going on.


Ramon Casha
Megabyte Ltd (www.megabyte.net)
F4, The Technopark, Mosta MST02
tel: (+356) 2142 1600
fax: (+356) 2142 1590

The information contained in this electronic mail may be confidential or legally privileged.
It is for the intended recipient(s) only. Should you receive this message in error, please
notify the sender by replying to this mail. Unauthorised use of the contents is strictly prohibited.
Whilst all care has been taken, the Megabyte Group is not responsible for the integrity of
the contents of this electronic mail and any attachments included within. 

View raw message