adding solution to automatically retrieve inserted id from ->save(), fixing numerous php notifies and warnings