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">
      <subMap value="NULL" resultMap="SupportItemResult" />
    </discriminator>
 
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]>
Sent: Friday, November 03, 2006 4:31 PM
To: [email protected]
Subject: Re: discriminator and submap

I'd probably do something like NVL(field, 'someMagicNullString') in
the sql to make sure that it wasn't null. :-/

Crude, but effective.

Larry


On 11/3/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>wrote:
>
>
> Can I use the discriminator and sub map to test for null values? Meaning if
> I define the discriminator for a field and I want to apply one result map if
> the field is null and another if it is not, how do I define this?
>
> Thanks....
>
> Chris Mathrusse
> [EMAIL PROTECTED]
> (925) 236-5553
>

Reply via email to