Skip to content

Commit

Permalink
Insert a true null instead of a string “null”
Browse files Browse the repository at this point in the history
  • Loading branch information
whoshuu authored and Huu Nguyen committed Jul 11, 2014
1 parent 913dbf3 commit 2ca05f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/src/com/orm/SugarRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ long save(SQLiteDatabase db) {
values.put(columnName, (Long) null);
}
} else {
values.put(columnName, String.valueOf(columnValue));
if (columnValue == null) {
values.putNull(columnName);
} else {
values.put(columnName, String.valueOf(columnValue));
}
}
}

Expand Down

0 comments on commit 2ca05f4

Please sign in to comment.