Nathan, You don't have to use isNotNull, but you do have to specify the JDBC type for all nullable columns. This is a JDBC requirement (I've never understood why). Some drivers are smart enough to deal with it --unfortunately Oracle is not one of them.
So simply specify the JDBC type and all null columns will be set using setNull(). Cheers, Clinton On Sun, 13 Feb 2005 19:30:56 -0700, Nathan Maves <[EMAIL PROTECTED]> wrote: > 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 > >> > >> > >> > > > >

