From caf17d949f68927a9477f61351c0550fc3c898ed Mon Sep 17 00:00:00 2001 From: Pavel Horal Date: Mon, 7 Oct 2024 20:12:17 +0200 Subject: [PATCH] Treat NULL values in mapped tables as undefined --- .../openidm/repo/jdbc/impl/mapper/MappedResultMapper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openidm-repo-jdbc/src/main/java/org/forgerock/openidm/repo/jdbc/impl/mapper/MappedResultMapper.java b/openidm-repo-jdbc/src/main/java/org/forgerock/openidm/repo/jdbc/impl/mapper/MappedResultMapper.java index 468a5ba0a..7989f3436 100644 --- a/openidm-repo-jdbc/src/main/java/org/forgerock/openidm/repo/jdbc/impl/mapper/MappedResultMapper.java +++ b/openidm-repo-jdbc/src/main/java/org/forgerock/openidm/repo/jdbc/impl/mapper/MappedResultMapper.java @@ -106,7 +106,10 @@ public Map map(ResultSet resultSet) throws SQLException, IOExcep default: throw new InternalServerErrorException("Unsupported DB column type " + config.valueType); } - result.putPermissive(config.propertyName, value); + // treat NULL as undefined + if (value != null) { + result.putPermissive(config.propertyName, value); + } } return result.asMap(); }