Java Mailing List Archive

http://www.junlu.com/

Home » user-cs.ibatis »

Does iBatis support generic TypeHandlerCallbacks spanning multiple
assemblies?

FMT

2009-12-03

Replies: Find Java Web Hosting

Author LoginPost Reply

I'm looking at doing something like this:

public class MyGenericTypeHandlerCallback<T> : ITypeHandlerCallback

then in my sqlmap i want to do:

<alias>
  <typeAlias alias="MySpecialTypeHandler"
type="myFirstNamespace.MyGenericTypeHandlerCallback`1[mysecondNamespace.MySpecialType],
myFirstAssembly"/>
</alias>

the key here is that MyGenericTypeHandlerCallback is defined and compiled in
myFirstAssembly, while MySpecialType is defined and compiled in a different
assembly, mySecondAssembly.

So when i try the alias above, iBatis complains (rightfully so) that it
can't find mysecondNamespace.MySpecialType. It's right to complain since i
did not tell it anything about mySecondAssembly.

so i tried:

<alias>
  <typeAlias alias="MySpecialTypeHandler"
type="myFirstNamespace.MyGenericTypeHandlerCallback`1[mysecondNamespace.MySpecialType,
mySecondAssembly], myFirstAssembly"/>
</alias>

but it doesn't like this either. Any creative idea as to how to make this
work? For a variety of reasons, i would rather not define the generic
MyGenericTypeHandlerCallback type in the same assembly as MySpecialType.

Any idea is welcome,

thanks.
--
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscribe@(protected)
For additional commands, e-mail: user-cs-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.