ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lihh <hanhu...@gmail.com>
Subject retrieve a list of strings, how?
Date Thu, 11 Oct 2007 19:13:36 GMT

Hi all,

I am very new on iBatis and I have searched this forum and followed few of
the examples but still not able to get this to work.

In my sqlmap I have this
<resultMap id="ClueEntry" class="ClueEntry">
   <result property="memberList" column="id" select="getMemberListById" />

  <select id="getMemberListById" parameterClass="java.lang.String"
  	SELECT fullname FROM members where members.specialid = #id#

the id is a special id, multiple people can have the same id #, I verified
the statement on the sql server and I got a list of 4 names. However, the
result for memberList is always null.

the ClueEntry class is like this:
public ClueEntry {
   private List memberList = new ArrayList();
	public List getMemberList () {
		return this.memberList ;

	public void setMemberList (List memberList ) {
		this.memberList = memberList ;

The ClueEntry class also contains other simple primitive types like string
and integer and I can get the data  into the resultmap without a problem.

Can someone point out to me what have I done wrong here? Thank you very much
for your help.
View this message in context: http://www.nabble.com/retrieve-a-list-of-strings%2C-how--tf4609397.html#a13162784
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message