Fix error when inserting records with key set to 0 and null - UUID() was used instead