Re: what happened to queryForMap?
I would think that a more efficient SQL tree query would be much better for this case. That way you get exactly what your looking for then you can return the objects back that you need rather then looping though all or most of the tree structure in Java. Read the book by Joe Celko on Tree algorithms for some great info on how to deal with this. Regards, Brian Hurley secret...@javmug.org Leader Spring Dallas User Group Original Message Subject: Re: what happened to queryForMap? From: Rick R ric...@gmail.com To: user-java@ibatis.apache.org Date: 03/19/2010 19:52 On Fri, Mar 19, 2010 at 8:08 PM, Clinton Begin clinton.be...@gmail.com mailto:clinton.be...@gmail.com wrote: It was liquidated. Honestly I thought it was messy... but maybe I underestimated its usefulness... Well, most times I'm using it are for when I have a nested structure defined defined by a parentID column in the same table and you can have n umber of nodes in your tree. I get too lazy trying to figure out how to get an ibatis map populated n-levels deep of nested nodes, so I typically just return a map of all values... key: id, value: thObject. Then I just go and manually iterate over the values of the map and add if it has a parentID I find the parent in the map by id and then it as child to the parent. Seem to work pretty well, but maybe there's a more efficient way to build up a tree? - To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org
what happened to queryForMap?
I really though queryForMap was cool. I'm looking for how to do it in ibatis3 but don't see a way. Doesn't seem to exist as a select type on the Session (and don't see it in the docs.) Was it canned in ibatis3, if so, just curious why? (Granted it's not hard to build a Map in java after I get my list, but hey it was one less step I had to do using ibatis queryForMap) -- Rick R
Re: what happened to queryForMap?
It was liquidated. Honestly I thought it was messy... but maybe I underestimated its usefulness... Clinton On Fri, Mar 19, 2010 at 3:19 PM, Rick R ric...@gmail.com wrote: I really though queryForMap was cool. I'm looking for how to do it in ibatis3 but don't see a way. Doesn't seem to exist as a select type on the Session (and don't see it in the docs.) Was it canned in ibatis3, if so, just curious why? (Granted it's not hard to build a Map in java after I get my list, but hey it was one less step I had to do using ibatis queryForMap) -- Rick R
Re: what happened to queryForMap?
On Fri, Mar 19, 2010 at 8:08 PM, Clinton Begin clinton.be...@gmail.comwrote: It was liquidated. Honestly I thought it was messy... but maybe I underestimated its usefulness... Well, most times I'm using it are for when I have a nested structure defined defined by a parentID column in the same table and you can have n umber of nodes in your tree. I get too lazy trying to figure out how to get an ibatis map populated n-levels deep of nested nodes, so I typically just return a map of all values... key: id, value: thObject. Then I just go and manually iterate over the values of the map and add if it has a parentID I find the parent in the map by id and then it as child to the parent. Seem to work pretty well, but maybe there's a more efficient way to build up a tree?