You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Sebastian Radics (JIRA)" <ib...@incubator.apache.org> on 2007/05/29 14:03:22 UTC
[jira] Created: (IBATIS-432) BlobTypeHandlerCallback doesn't
support Null-Values
BlobTypeHandlerCallback doesn't support Null-Values
---------------------------------------------------
Key: IBATIS-432
URL: https://issues.apache.org/jira/browse/IBATIS-432
Project: iBatis for Java
Issue Type: Bug
Components: SQL Maps
Affects Versions: 2.1.7
Environment: all
Reporter: Sebastian Radics
Setting of Null for Blobs results in Error-Message:
At least one parameter to the current statement is uninitialized with derby.
Fix:
Method BlobTypeHandlerCallback#setParameter:
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
if (null != parameter) {
byte[] bytes = (byte[]) parameter;
ByteArrayInputStream bis=new ByteArrayInputStream(bytes);
setter.setBinaryStream(bis,(int)(bytes.length));
}else{//NEW - handle null-Values - Use Sql-Type BLOB
setter.setNull(Types.BLOB);
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.