This worked like a charm. Thanks for the suggestion. I hadn't really
thought of doing this but it makes perfect sense and it's extremely
easy. From: "Niels Beekman" <[EMAIL PROTECTED]> [mailto:"Niels Beekman" <[EMAIL PROTECTED]>] Sent: Saturday, November 04, 2006 3:35 AM To: <user-java@ibatis.apache.org> Subject: RE: discriminator and submap If only if/else
behaviour is required, why not create an additional column? Something
like: SELECT *, CASE WHEN
part_no IS NULL THEN 0 ELSE 1 END AS hasPartNo FROM
yourTable
<discriminator column="hasPartNo" javaType="java.lang.Boolean"
jdbcType="BIT">
<subMap value="1" resultMap="SupportItemResult_withPart"
/>
<subMap value="0" resultMap="SupportItemResult_withoutPart"
/>
</discriminator> Niels From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Well I did something similar but I still
need to perform the 'else'. <discriminator
column="part_no" javaType="java.lang.String" jdbcType="VARCHAR"
nullValue="NULL"> My problem is that the above will apply the
resultMap if the field part_no is null, but how do I apply a different resultMap
if part_no is not null. I don't want to test for all possible values I only want
a simple if/else basically. From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of "Larry Meadors"
<[EMAIL PROTECTED]> I'd probably do something like NVL(field,
'someMagicNullString') in |