If you are having trouble updating database columns to null, the problem may be that DetectOmissions is defaulted to true.
If you are not passing in xml with explicit xsi:nil="true" attributes, DBAdapter is ignoring not set as simply that.
With DBAdapter wsdl property DetectOmissions="true"
<columnElement xsi:nil="true"/>
-> updated to null in db
<columnElement ></columnElement >
-> excluded from the update statement
With DBAdapter wsdl property DetectOmissions="false"
<columnElement xsi:nil="true"/>
-> updated to null in db
<columnElement ></columnElement >
-> updated to null in db
DetectOmissions is useful feature when you have a large number of columns, but only want to update values for those few columns you actually set new values for.
0 comments:
Post a Comment