ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Kahn <jkahn_...@yahoo.com>
Subject Strongly Typed Collections?
Date Mon, 10 Dec 2007 20:21:16 GMT
Forgive me if this is obvious, but I am an iBatis newbie.

In my model object, I have a property that is a custom collection:
       |-- MyModelList (collection of MyModel objects -- implements List, extends ArrayList)

In my SqlMap, I have defined a separate select query to retrieve this collection, which returns
a List of MyModel objects.  This, however, causes an IllegalArgumentException at runtime as
the setter is expecting a MyModelList and not a List.  There is an easy way to code around
this, but I am curious if there is a best practice for implementing/mapping this in iBatis.

How does iBatis handle strongly typed custom collections? (I did find a reference to a SqlMap
property "listClass" but it seems to have been deprecated in version 2).


Never miss a thing.  Make Yahoo your home page. 

View raw message