After much research, I am unable to solve the following problem.
I need to pass a null value from C# to NHibernate to Oracle.
ex.
C# snipet:
int? slope = null;
double? curvature = null;
Oracle:
the two corresponding columns allow null
NHibernate Config
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="SplinePublish.ShapePublishRecord, SplinePublish" table="NT_CV_SPLINE_SHAPE_POINT">
<id name="DbID" column="SHAPE_PUBLISH_ID">
<generator class="native">
<param name="sequence">SPLINE_SHAPE_PUBLISH_ID_SEQ</param>
</generator>
</id>
<property name="LinkId" column="LINK_ID"/>
<property name="Sequence" column="SEQUENCE"/>
<property name="VertFlagChar" column="IS_VERTICAL_ONLY" />
<property name="latitude" column="HPLAT" access="field" />
<property name="longitude" column="HPLON" access="field"/>
<property name="Height" column="HPELEVATION" />
<property name="Curvature" column="CURVATURE" />
<property name="Heading" column="HEADING" />
<property name="Slope" column="SLOPE" />
<property name="ZLevel" column="ZLEVEL" />
<property name="SplineId" column="SPLINE_ID" />
<property name="SplineStampId" column="SPLINE_STAMP_ID" />
</class>
</hibernate-mapping>
I get an error saying that it can't insert because Oracle is expecting a number and receiving a binary.
Can anyone help?
Thank you in advance.
|