Cannot set null value in AO on MSSQL

Description

I cannot set a null value when running on MSSQL 1.1.3.

This breaks at minimum the HipChat plugin in Bitbucket Server 4.0.4 and 4.1.x

It is pretty simple to reproduce using AO 1.1.3, sqljdbc-4.2.6420

Entity:

1 2 3 4 5 6 public interface TestEntity extends Entity { String getDescription(); void setDescription(String description); boolean isComplete(); void setComplete(boolean complete); }

Test:

1 2 3 4 TestEntity testEntity = activeObjects.create(TestEntity.class); testEntity.setComplete(true); testEntity.setDescription(null); testEntity.save(); // this line throws an exception

Exception:

1 2 3 4 5 6 7 8 9 Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ','. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:191) ~[sqljdbc-4.2.6420.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerParameterMetaData.<init>(SQLServerParameterMetaData.java:423) ~[sqljdbc-4.2.6420.jar:na] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getParameterMetaData(SQLServerPreparedStatement.java:1659) ~[sqljdbc-4.2.6420.jar:na] at com.zaxxer.hikari.proxy.HikariPreparedStatementProxy.getParameterMetaData(HikariPreparedStatementProxy.java) ~[HikariCP-2.4.1.jar:na] at net.java.ao.DatabaseProvider.putNull(DatabaseProvider.java:1953) ~[na:na] at net.java.ao.EntityProxy.save(EntityProxy.java:560) ~[na:na] at net.java.ao.EntityProxy.invoke(EntityProxy.java:115) ~[na:na] ... 22 common frames omitted

Environment

None

Testing Notes

Add notes...

Status

Assignee

Alex Courtis

Reporter

Scott Goodhew

Labels

Add-on Type

None

Team

None

CC

None

Risk factor

None

QA Kickoff Status

None

QA Demo Status

None

Story Points

1

Sprint

None

Fix versions

Affects versions

1.1.3

Priority

Critical