Documentation bug: Data Mapper Guide 1.2.1.pdf nullValue in <result>
--------------------------------------------------------------------
Key: IBATISNET-136
URL: http://issues.apache.org/jira/browse/IBATISNET-136
Project: iBatis for .NET
Type: Bug
Components: Documentation
Versions: DataMapper 1.2.1
Environment: .Net
Reporter: Norman Katz
3.5.3.7. nullValue
The nullValue attribute can be set to any valid value (based on property type).
The nullValue attribute is used
to specify an outgoing null value replacement. What this means is that when the
value is detected in the object
property, a NULL will be written to the database (the opposite behavior of an
inbound null value replacement).
This allows you to use a "magic" null number in your application for types that
do not support null values (such
as int, double, float). When these types of properties contain a matching null
value (say, -9999), a NULL
will be written to the database instead of the value.
If your database has a NULLABLE column, but you want your application to
represent NULL with a constant
value, you can specify it in the Result Map as shown in Example 3.25.
This seems close to a verbatim copy of the nullValue section of <parameter>
(3.4.2.6.). I believe it should actually state one of the following:
a) ... when a null value is detected in a result returned from the query, the
replacement value will be stored in the corresponding result property.
or
b) ... when the value is detected in the result returned from the query, a null
will be stored in the corresponding result property.
Nothing is being "written to the database" when you're in the context of a
<result> so I believe your current text is inaccurate and this paragraph should
be revised.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira