Set id of model after insertion