On Friday 14 Oct 2005 19:05, Alan Chandler wrote:
> 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 "m_no")
>
> 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)
This doesn't work
I get a Runtime exception
Caused by: com.ibatis.common.beans.ProbeException: There is no WRITEABLE
property named 'a_key' in class 'uk.org.chandlerfamily.sqlmap.famtree.Family'
--
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.