Hi there, I'm trying to use IBatis to model a parent-child relationship where i have some object that has a parent, and that parent has its own parent, and so on. Is this supported? I am having trouble making it work and I suspect that I may not be doing it right because my results are always null (but no exceptions). Below is my example sql map definition that causes the problem:
<resultMap id="result" class="someClass"> <result property="id" column="id"/> <result property="parent" column="id" select="getParent"/> </resultMap> <select id="getParent" parameterClass="string" resultMap="result"> select f1.id as id from someTable f1, (select parentID from someTable where id = #value#) f2 where f1.id = f2.parentID </select> When I call getParent, it would fail given the definition above. If I remove the <result property="parent"...> line in "result" resultMap, then it works. What I'm trying to do is to lazy-select the parent recursively. Does anyone know if IBatis support this concept? -- View this message in context: http://www.nabble.com/Does-Ibatis-support-recursive-sql-maps--tp22934620p22934620.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com.