MutableDocument save null to int field

when I try:

  .setInt("startingCode", null);

it doesn’t compile. The following works well:

.setString(“payGradeGroup”, null);

Is there a way to do that or string is the way to go?

setters and getters are type safe. So null is not compatible with int type. Not quite sure of the reason why you need to set a null value for an int type property. Can you elaborate?

If you must, try using setNumber instead.