Hi
I have a Class X containing a List of Class Y
Class X {
String a
List<Y> b
}
Class Y {
String index
String desc
}
The resultMap I have is
<resultMap id="someID" type="X">
<id property="a" column="id"/>
<collection property="b" ofType="Y">
<id property="index"
column="index" />
<result property="desc" column="desc"/>
-->
</collection>
</resultMap>
This is fine, but I don't want the resulting X to have the collection
b set, if the "index" value is null. If index is null, even the value
of b in X should be null. I tried using <discriminator> and also
tried creating a separate sql, but no luck. Any ideas?
-V
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org