Update the id of the javascript model on create