added test for save record with null primary key