Fixed
Details
Assignee
Michael OffnerMichael OffnerReporter
Maciej MaciakMaciej MaciakPriority
NewFix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Maciej Maciak
Maciej MaciakPriority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Created 16 July 2018 at 12:30
Updated 20 July 2023 at 09:59
Resolved 13 August 2018 at 15:38
issue seems to be related with lucee-java/lucee-core/src/lucee/runtime/tag/ProcParamBean.java function isNulls that currently supports empty strings only for VARCHAR and LONGVARCHAR string types.
public boolean isNulls() { return getValue()==null || (sqlType!=Types.VARCHAR && sqlType!=Types.LONGVARCHAR && getValue() instanceof String && StringUtil.isEmpty(getValue())); // <--- missing support for NVARCHAR and other string types }
how to reproduce:
sql structure:
CREATE TABLE [dbo].[__nvarchartest]( [nv] [nvarchar](10) NULL ) GO CREATE PROCEDURE [dbo].[__sp_nvarchartest] @nv nvarchar AS BEGIN INSERT INTO __nvarchartest VALUES (@nv) END GO
cfml code
<cfstoredproc procedure="__sp_nvarchartest" datasource="#DSOURCE#"> <cfprocparam type = "IN" CFSQLType = "NVARCHAR" value = "" null=false> </cfstoredproc>
expected result:
1 record with empty string in nv column
but getting:
1 record with null in nv column