Set ID when adding new object to DB