diff --git a/src/main/java/me/mrnavastar/sqlib/api/DataContainer.java b/src/main/java/me/mrnavastar/sqlib/api/DataContainer.java index 265f891..b998720 100644 --- a/src/main/java/me/mrnavastar/sqlib/api/DataContainer.java +++ b/src/main/java/me/mrnavastar/sqlib/api/DataContainer.java @@ -46,7 +46,9 @@ public void put(SQLibType type, @NonNull String field, T value) { } public T get(SQLibType type, @NonNull String field) { - return type.deserialize(connection.readField(store, id, field, type.getType().getClazz())); + Object value = connection.readField(store, id, field, type.getType().getClazz()); + if (value == null) return null; + return type.deserialize(value); } public void clear(@NonNull String field) {