posted 17 years ago
I have a simple mapping using a parameterClass :
<insert id="insertTest" parameterClass="mypackage.MyClass">
...
I'm not sure how to deal with NULL values in MyClass.
What I do now is using isNotNull and isNull tags like :
<isNotNull property="myproperty">
#myproperty#,
</isNotNull>
<isNull property="myproperty">
NULL,
</isNull>
This is ugly. Is there a better way to deal NULLs ?
I know I could use parameterMap instead of parameterClass but it does not seem to be recommended.