Model.save retrieves all ContentValues before invoking beforeCreate() which breaks fields that are not nullable but are initialized in beforeCreate(). An example of this can be seen in the sample where a Note cannot be saved because of a NullPointerException thrown by the DateSerializer for the field createdAt.
Model.save
retrieves allContentValues
before invokingbeforeCreate()
which breaks fields that are not nullable but are initialized inbeforeCreate()
. An example of this can be seen in the sample where a Note cannot be saved because of aNullPointerException
thrown by theDateSerializer
for the fieldcreatedAt
.