This is working great for me. Thanks V.
But how do you use it on a date?
#termsAccepted:DATE:NO_ENTRY#,
does not seem to be working for me.
Nathan
On Feb 11, 2005, at 4:20 PM, friendVU admin wrote:
Why.. yes there is! insert into A ( name, ... ) values ( #name:VARCHAR:NO_ENTRY#, ... )
Works same on updates. Some notes in docs.
.V
Nathan Maves wrote:
Is there a better way for dealing with null attributes?
Currently I have to do something like..
<insert id="insertA"> insert into A ( id <isNotNull prepend="," property="name"> name </isNotNull> ) values ( #id# <isNotNull prepend="," property="name"> #name# </isNotNull> ) </insert>
or
<insert id="insertA"> insert into A ( id, name ) values ( #id# <isNotNull prepend="," property="name"> #name# </isNotNull> <isNull prepend="," property="name"> null </isNotNull> ) </insert>
This become very tedious when you have 10+ columns that might be null. Why does this happen with Oracle? Is there anyway that iBatis could check if the property was null and if so call the setNull() of a prepared statement? I am sure that I am over simplifying the process but just thought I would throw it out there.
Nathan

