ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chandler <a...@chandlerfamily.org.uk>
Subject Group By for multiple column primary keys
Date Fri, 14 Oct 2005 18:05:50 GMT
I have a table in which I have just add to change it from one to two columns 
making up the primary key. (before it was column "sid", now I also need 

This is how I used to do it

	<resultMap id="family-list" class="family"
		groupBy="marriage.spouse.id" >
		<result property="marriage.spouse.id" column="sid" />
		<result property="marriage.m_no" column="m_no" />

I think the manual implies this - is it correct?

<resultMap id="family-list" class="family"
	groupBy="a_key" >
	<result property=a_key column="{marriage.spouse.id = sid, marriage.m_no 
=m_no}" />

... (ignoring mail wordwrap issues)

Alan Chandler
Open Source. It's the difference between trust and antitrust.

View raw message