Hi,
I'm not into the migration tool that much, but you should be able to finde the
code within the ibatis3-core
project:
https://svn.apache.org/repos/asf/ibatis/java/ibatis-3/trunk/ibatis-3-core
Regards
Kai
--- Original Nachricht ---
Absender: camelContext
Datum: 20.10.2009 22:46
Hi All,
I've tried to find the doco for this, but havent so far. In iBatis, if I use
queryForMap(), the resulting Map ordering (predictably) doesnt follow the
order-by clause of the query (it seems to always order by the Key property
value). Is there an API-level way to determine the Map sort order, or
what is your result class for the sqlmap? Have you tried to use
java.lang.LinkedHashMap ?
Nathan
On Wed, Oct 21, 2009 at 12:00 PM, George.Francis gfranc...@gmail.comwrote:
I've tried to find the doco for this, but havent so far. In iBatis, if I
use
queryForMap(), the resulting Map ordering
Sorry if this is obvious, but how do I change the Map implementation returned
by getSqlMapClientTemplate().queryForMap(...). At the moment it returns a
java.util.HashMap.
The 'resultMap' attribute of my select query refers to the custom domain
object mapping I have specified - this is the
Cool, will try to come up with a solution for the post script stuff. Will
also send code reviews, if you think it might be useful feature.
Hey BTW, i am not able to do a simple mvn clean compile on the ibatis-3-core
project. It is throwing up some maven related error
Pasting the error below
Never mind, resolved the issue, i did not have the parent pom.
I would really love to know if the feature of post processing would be
really helpful?
I have actually added another property to the development.properties called
postProcessorFile, which states the file name to be executed after,
Nathan Maves wrote:
I dont think that this is possible from this direction. Remember that
the sqlmap was just doing a map.get(cust_id) and getting null back
which is the expected behavior.
An easy solution would be to first check if the map entry exists:
if (map.containsKey(keyVal))
Check this out for a sample
http://www.moorthyhome.com/blog/entry/ibatis_oracle_stored_procedure
http://www.moorthyhome.com/blog/entry/ibatis_oracle_stored_procedure
Fabiano Ferrari wrote:
Hi, all.
I need some help to run a stored procedure with iBATIS. Sorry if this
question has
I've also tried:
select id=pcmStatus resultClass=java.util.LinkedHashMap
remapResults=true
but this just makes queryForMap() return a HashMap with LinkedHashMaps as
values...
George.Francis wrote:
Sorry if this is obvious, but how do I change the Map implementation
returned by
Ah I overlooked that you were using queryForMap(). Maybe I can clear this
up for you. If you need a list of ordered objects then use queryForList().
If you want a map based on a key for quick lookup then use queryForMap().
Without knowing what you are trying to query for I dont know which is
Thanks Nathan,
If I use queryForList() I get an ArrayListPerson which is also not an
order-sensitive implementation of List. I guess what I'm missing is how to
get either queryForList() to return a LinkedListPerson, or queryForMap()
to return a LinkedHashMapString,Person
--
View this message
sorry, I got confused there for a moment. ArrayList is fine.
Thanks again.
--
View this message in context:
http://www.nabble.com/queryForMap%28%29-ordering-tp25997320p26003892.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
12 matches
Mail list logo