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", so you could use SQL column aliases to get
names like C01, C02, etc. and then construct a List from the Map. E.g.
select usernm as c00, passwd as c01, eng_name as c02, ...
Does this help?
- gary
At 08:28 AM 11/30/2005, you wrote:
In table xml file, I try to return a List.
Is it able to return a List of object of record?
(I have this question because I find the return a single record have
the very similar setup)
Thanks
table xml file
<select id="getUserProfileList" parameterClass="string"
resultMap="userProfileResult">
select usernm, passwd, eng_name, chi_name, dob, join_date,
creation_date, created_by, last_update_date, last_update_by
from user_profile
where usernm = #usernm#
</select>
table SqlMapDao file
public class UserProfileSqlMapDao extends BaseSqlMapDao implements
UserProfileDao {
...
public List getUserProfileList(String usernm) {
return super.queryForList("getUserProfileList", usernm);
}
------------------------------------------------------------------------
The information contained in this communication is intended
only for the use of the recipient(s) named above. It may
contain information that is privileged or confidential, and
may be protected by State and/or Federal Regulations. If
the reader of this message is not the intended recipient,
you are hereby notified that any dissemination,
distribution, or copying of this communication, or any of
its contents, is strictly prohibited. If you have received
this communication in error, please return it to the sender
immediately and delete the original message and any copy
of it from your computer system. If you have any questions
concerning this message, please contact the sender.
------------------------------------------------------------------------