Interesting, thanks.

However, I think it's a bit ugly. And what about if we want to insert null
value?

Kengkaj

2009/3/18 Iwao AVE! <haraw...@gmail.com>

> Hi Alin,
>
> How about using <isNotNull /> or <isNotEmpty />?
>
> <insert id="insertExample" parameterClass="com.test.Example">
>  INSERT INTO vjobs (
>  name, status
>   <isNotNull property="description" prepend=",">
>   description
>  </isNotNull>
>  ) VALUES (
>  #name#, #status#
>  <isNotNull property="description" prepend=",">
>   #description#
>  </isNotNull>
>  )
> </insert>
>
> I haven't tested this, but it should work.
>
> Regards,
> Iwao
>
>
>

Reply via email to