Cannot start a transaction when the model has pending changes. Save or discard the changes before starting a transaction. ...