test insert converts DateTime objects to string.
maybe pass $data to toString and toObject methods.
less side effects.
test on delete.