Re: java.util.HashMap as resultClass

2005-02-26 Thread Admin
It's not that much space wasted. .V Pascal DeMilly wrote: Hi, I would like to retrieve a Map with whose key is the 1st column of my query and the value is the 2nd column. For example right now I do: select id=getItemNameMap resultClass=java.util.HashMap select SKU, Description from Items

Re: java.util.HashMap as resultClass

2005-01-24 Thread Pascal DeMilly
, Pascal DeMilly [EMAIL PROTECTED] wrote: Hi, I would like to retrieve a Map with whose key is the 1st column of my query and the value is the 2nd column. For example right now I do: select id=getItemNameMap resultClass=java.util.HashMap select SKU, Description from Items

Re: java.util.HashMap as resultClass

2005-01-24 Thread Brandon Goodin
() instead. On Mon, 24 Jan 2005 08:42:25 -0800, Pascal DeMilly [EMAIL PROTECTED] wrote: Hi, I would like to retrieve a Map with whose key is the 1st column of my query and the value is the 2nd column. For example right now I do: select id=getItemNameMap resultClass

Re: java.util.HashMap as resultClass

2005-01-24 Thread Pascal DeMilly
Actually I solved it this way: in my DAO code, I use a generic, ID and Name for key/value pair. Then in my iBatis SQLMap I used aliases to rename my columns to what my DAO expect. select id=... resultClass=java.util.HashMap select SKU is ID, Description as Name from Items /select Now my

Re: java.util.HashMap as resultClass

2005-01-24 Thread Brandon Goodin
aliases to rename my columns to what my DAO expect. select id=... resultClass=java.util.HashMap select SKU is ID, Description as Name from Items /select Now my DAO code is free again from Knowing how the tables are built. Regards Pascal On Mon, 2005-01-24 at 09:22, Pascal

Re: java.util.HashMap as resultClass

2005-01-24 Thread Pascal DeMilly
. On Mon, 24 Jan 2005 08:42:25 -0800, Pascal DeMilly [EMAIL PROTECTED] wrote: Hi, I would like to retrieve a Map with whose key is the 1st column of my query and the value is the 2nd column. For example right now I do: select id=getItemNameMap resultClass=java.util.HashMap

Re: java.util.HashMap as resultClass

2005-01-24 Thread Clinton Begin
query and the value is the 2nd column. For example right now I do: select id=getItemNameMap resultClass=java.util.HashMap select SKU, Description from Items /select However this returns a list of maps with the key being the column name

Re: java.util.HashMap as resultClass

2005-01-24 Thread Brice Ruth
=getItemNameMap resultClass=java.util.HashMap select SKU, Description from Items /select However this returns a list of maps with the key being the column name and the value the column value which seems wasteful in term of space (I am using remoting

Re: java.util.HashMap as resultClass

2005-01-24 Thread Brice Ruth
, I would like to retrieve a Map with whose key is the 1st column of my query and the value is the 2nd column. For example right now I do: select id=getItemNameMap resultClass=java.util.HashMap select SKU, Description from Items /select