I'm not trying to be funny, Tony, but could the problem be that you
misspelled 'parameter_value' in your result map?
- gary
At 01:32 PM 1/11/2006, you wrote:
All,
I know this has been posted before. I have read a number of archived
emails regarding this issue and also the example
Boy, was my first answer off base! Sorry about that. If I may try again...
Sure, you can use the same select to retrieve both a record (via
queryForObject) and a list containing one record (via queryForList).
- gary
At 08:30 PM 11/30/2005, you wrote:
I want to get a List of records by get
Without seeing your userProfileResult map definition, it's hard to tell
exactly what you're trying to do. If you just want a list of Objects
without any field names, I don't think iBatis will do that. It will,
however, return a Map keyed by the field names if you say
resultClass="java.util.Map"
Hi, Xinyu.
You can specify a nested resultMap for the bean property instead of a column.
Of course, in your example, you could just map directly to the bean and not
use a HashMap at all, since the bean is the only property in the map. But
you could have more beans or other non-bean properties
OK, so this problem doesn't seem to be very high on anyone else's list. But
just in case anyone else ever wants to do this, I've posted a possible
patch on jira:
http://issues.apache.org/jira/browse/IBATIS-221?page=all
- gary
---
My compliments on a most useful product. I'm always thinking about ways
to improve the signal-to-noise ratio in business software, and SqlMaps
seems like a simple way to reuse a wide variety of familiar real-world
Java objects by linking them directly to SQL parameters and
results.
One of the fir