See "3.5.12. Complex collection properties" in http://ibatis.apache.org/docs/dotnet/datamapper/ch03s05.html
On Mon, May 25, 2009 at 9:31 AM, Juan Pablo Araya <juanpablo.ar...@gmail.com > wrote: > Use in the resultmap: > <resultmap id="UniversityResult" class="University"> > .... > <result property = "collegelist" column="UNIVERSITY_ID" select > ="selectCollegeByUniversityId"/> > ... > </resultmap> > > and then create a statement called "selectCollegeByUniversityId" > > <select id="selectCollegeByUniversityId" parameterClass="Int32" > resultMap="the-CollegeResultMapping"> > select * from college where univ_id = #value# > </select> > > Greetings! > > > On Mon, May 25, 2009 at 9:15 AM, vinay.a <vinay_onm...@yahoo.com> wrote: > >> >> Hello all, >> >> I need some help on the below scenario: >> >> I have 2 business objects. Lets say 'University' and 'College'. >> The 'University' object has the following property. >> >> public IList<College> collegelist >> { >> get; >> set; >> } >> >> Now I want to execute a query that groups all the Colleges which come >> under >> an University, and store the result in the University Object. >> This way I will have one 'University' object (with university details), >> within which i will have an IList<College> with all the details of all the >> colleges under that university. >> >> Is it possible to achieve this using a query and object mapping in >> ibatis.net >> If not possible, please let me know. >> >> Thanks and regards, >> Vinay A >> -- >> View this message in context: >> http://www.nabble.com/Achieving-Group-By-feature.-tp23706884p23706884.html >> Sent from the iBATIS - User - Cs mailing list archive at Nabble.com. >> >> >