added the ability to generate the id for the new records in the model