I'm having trouble inserting a boolean into an Oracle 12 database using Dapper.
The exception I get is
ORA-00932: inconsistent datatypes: expected NUMBER got BOOLEAN
The CommandText is
INSERT INTO crossqueryb.counterparty (Id,Name,IsBroker,DefaultPortfolioId) VALUES (:Id,:Name,:IsBroker,:DefaultPortfolioId)
IsBroker is defined as a
When I inspect the OracleParameter the DbType and OracleDbType properties are set to
Boolean. The value is
false, the type of the value is
The parameters are passed to the Query method as an
IDictionary<string,object>, not as the actual domain type or an anonymous type.
Do I need to write a custom typehandler for this or am I missing something else obvious?
IsBrokeris defined as a
You will need to convert your boolean value to a numeric value as Oracle will not know how you intend to perform the conversion (