I'm sure you need a List interface. Set is very unlikely to work since iBATIS does not produce Sets. Christian
________________________________ From: Todorovich, Milo [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 January 2007 12:24 To: [email protected] Subject: iBATIS in Action -- Lazy loading only works with Lists?? I want to have a bean that I load from the database using iBATIS. The bean has a collection that I would like to lazy load. Does the collection have to be an implementation of java.util.List? Or can I use any collection? The iBATIS in Action book does not specify that it must be a List. In addition, on page 11, the books says "iBATIS will work with any combination of data model and object model. There are nearly no restrictions or rules to how either is designed." However, on page 63 (3.3.1), the discussion mentions only Lists, not Sets or any other java collection interface. And on pages 128-132 (6.2), the mapping shown uses names ending in List, implying that the collections retrieved are Lists. So, do the lazy loaded collections need to be Lists?? Tests that I've ran using version 2.3.0.677 indicate that things work fine when the collection is a List, and I get exceptions when the collection is a Set. Thanks, Milo Todorovich
