Just to reply to my own reply: the place where I have used this is in creating discriminator column values on the fly when using a single query with parameterized table names to support concrete table inheritance. Works fantastically. I have yet to push generics as far into the model as I want due to being held back by a bug in the DelegatePropertySetAccessor, but I’ve saved a tonne of code and statements with the reuse I’ve been able to get out of what has worked so far.




From: Jeremy Gray [mailto:jgray@siberra.com]
Sent: Monday, September 25, 2006 10:19 AM
To: user-cs@ibatis.apache.org
Subject: RE: Composite Key parameter


Where you have 2.5, 20, and 40, Ibatis is expecting a result set column name. If you can modify your query to produce the values and modify the column attribute to say ParentImageID=ImageID,Magnification=NewColumnName then it’ll work perfectly.




From: Luke Siler [mailto:LukeS@lsbio.com]
Sent: Monday, September 25, 2006 8:55 AM
To: user-cs@ibatis.apache.org
Subject: FW: Composite Key parameter



I have a follow-up to my composite key parameter question.  I looked at order.xml and see the following example:

<result property="FavouriteLineItem" column="Order_ID=Order_ID,LineItem_ID=Order_FavouriteLineItem" select="GetSpecificLineItem" />


I'm using the same syntax in my example but with a literal parameter value.  Should I expect this to work?

<resultMap id="ImageMapResultDeep" class="ImageMap" extends="ImageMapResultShallow">

<result property="TwoAndOneHalfXChildren" column="ParentImageID=ImageID,Magnification=2.5" select="JPPGetMappedImage" />

<result property="TwentyXChildren" column="ParentImageID=ImageID,Magnification=20" select="JPPGetMappedImage" />

<result property="FortyXChildren" column="ParentImageID=ImageID,Magnification=40" select="JPPGetMappedImage" />