Larry
On 8/4/05, Nathan Maves <[EMAIL PROTECTED]> wrote:
I would hope it is that simple but that leads me to ask about the
last parameter of the
queryForMap(String statementName, Object parameterObject, String
keyProperty, String valueProperty);
When using it with your below example would
queryForMap("studentStatement", null, "id", "fname");
return a Map of
1 - Niels
2 - Nathan
On Aug 4, 2005, at 12:29 PM, Niels Beekman wrote:
> I would say:
>
> <select id="studentStatement" resultClass="Student">
> SELECT id, fname, lname
> FROM students
> </select>
>
> queryForMap("studentStatement", null, "id");
>
> this would result in for example:
>
> 1 - Student1
> 2 - Student2
>
> Or is this too simpleminded?
>
> Niels
>
> -----Original Message-----
> From: Nathan Maves [mailto: [EMAIL PROTECTED]]
> Sent: donderdag 4 augustus 2005 18:09
> To: [email protected]
> Subject: More complex example of a queryForMap call
>
> Given a student table....
>
> id,fname,lname....
>
>
> how would you make the call to return a Map of Students keys on the
> studentId?
>
> I think the manual is a bit confusing and I am going to create a wiki
> on the topic.
>
> Nathan
>
>
