diff --git a/pom.xml b/pom.xml index 38516c2..3011f1a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.github.sproket persism - 1.2.0 + 1.2.1 jar @@ -273,13 +273,13 @@ org.apache.logging.log4j log4j-api - 2.13.0 + 2.15.0 provided org.apache.logging.log4j log4j-core - 2.13.0 + 2.15.0 provided diff --git a/release-notes.md b/release-notes.md index 454a115..469fef6 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,5 +1,8 @@ ## Release Notes +### 1.2.1 +* Update log4j2 reference in POM to 2.15.0 + ### 1.2.0 * Added support for Views * Added query 'select *' method to session diff --git a/src/net/sf/persism/Session.java b/src/net/sf/persism/Session.java index 2ed31d3..eed33a6 100644 --- a/src/net/sf/persism/Session.java +++ b/src/net/sf/persism/Session.java @@ -846,7 +846,11 @@ void setParameters(PreparedStatement st, Object[] parameters) throws SQLExceptio } else { // param is null - st.setObject(n, param); + if (metaData.getConnectionType() == ConnectionTypes.UCanAccess) { + st.setNull(n, java.sql.Types.OTHER); + } else { + st.setObject(n, null); + } } n++; diff --git a/test/net/sf/persism/TestMSAccess.java b/test/net/sf/persism/TestMSAccess.java index 9f42be9..0002926 100644 --- a/test/net/sf/persism/TestMSAccess.java +++ b/test/net/sf/persism/TestMSAccess.java @@ -110,7 +110,7 @@ public void testContact() throws SQLException, IOException { // add to the array? // attachments = contact.getAttachments(); List attachmentList = new ArrayList<>(Arrays.asList(attachments)); - Attachment attachment = new Attachment(null, "test", "png", null, new Date(System.currentTimeMillis()), 0); + Attachment attachment = new Attachment(null, "test", "png", null, new Date(), 0); BufferedImage img = ImageIO.read(Objects.requireNonNull(getClass().getResourceAsStream("/logo1.png"))); ByteArrayOutputStream baos = new ByteArrayOutputStream();