diff --git a/phalcon/Mvc/Model.zep b/phalcon/Mvc/Model.zep index 57cd17cb0bf..ebdafe79374 100644 --- a/phalcon/Mvc/Model.zep +++ b/phalcon/Mvc/Model.zep @@ -955,10 +955,10 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, let metaData = this->getModelsMetaData(); /** - * Get the current connection + * Get the current connection use write to prevent replica lag * If the record already exists we must throw an exception */ - if this->_exists(metaData, this->getReadConnection()) { + if this->_exists(metaData, this->getWriteConnection()) { let this->errorMessages = [ new Message( "Record cannot be created because it already exists",