Retorna o null correto
This commit is contained in:
Miguel Ferreira 2023-05-11 12:17:05 +01:00
parent e561389192
commit 682c4a1e65
2 changed files with 2 additions and 1 deletions

View file

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.sf</groupId> <groupId>net.sf</groupId>
<artifactId>jeasyorm</artifactId> <artifactId>jeasyorm</artifactId>
<version>0.9.1</version> <version>0.9.2</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View file

@ -77,6 +77,7 @@ public abstract class AbstractEntityManager extends EntityManager {
} }
try { try {
Object v = getValue(rs, index, fi.getType(), sqlType); Object v = getValue(rs, index, fi.getType(), sqlType);
if (rs.wasNull()){v=null;}
set(o, fi, v); set(o, fi, v);
} catch (RuntimeSQLException e) { } catch (RuntimeSQLException e) {
throw new RuntimeSQLException("Can't read column '" + columnName + "'", e); throw new RuntimeSQLException("Can't read column '" + columnName + "'", e);