ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Johnson" <listAcco...@deepcode.co.uk>
Subject Generic Lists
Date Thu, 12 Jul 2007 17:19:36 GMT
Hi,

 

I'm struggling with trying to get a custom generic list collection working
with IBATIS lazy loading. Basically, if I have a simple object with a simple
mapping file that lazy loads a list and that list is defined in my object as
a List<T> then things work fine. Eg:

 

class myobject

{

.

public List<subobject> Children{get. set.}

}

 

But as soon as I introduce a new class to take over the list, eg:

 

public class MyList<T> : List<T>

{

}

 

And then change myobject to use that:

class myobject

{

.

public MyList<subobject> Children{get. set.}

}

 

IBATIS no longer lazy loads any data. I'm under the impression that any
collection that implements IList or IList<T> will work transparently with
lazy loading, yet the MyList<T> class above implements these (albeit in the
base class) and it doesn't work. 

 

Am I doing something stupid here?

 

Thanks

Tony

 


Mime
View raw message