I have made custom module for that I have to change tables primary key due to some reasons.I have updated it in
Model\Resource\Modelclass.php file , flush cache including "Flush Cache Storage" of cache management.
But enable to save data in db.
It shows properly the saved module and its id by 1.)
$saved_obj = $model->save(); echo'<pre>';print_r($saved_obj->getData()); exit;
$insertid = $model->save()->getId(); echo'<pre>';print_r($insertid); //exit();