Skip to content

Commit

Permalink
Bug fix for Query
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed Jan 9, 2017
1 parent e539d6f commit cbed71c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public function getDbConnection()
public function setDb($db)
{
if($db instanceof Database){
$this->databaseName = $db->database->getDatabaseName();
$this->databaseName = $db->getDatabaseName();
}elseif($db instanceof MongoDatabase){
$this->databaseName = $db->getDatabaseName();
}else{
Expand All @@ -349,7 +349,7 @@ public function getDb()
$name = $this->databaseName;
if($this->model){
// Get DB name from model
$name = $this->model->getCollection()->database->getDatabaseName();
$name = $this->model->getCollection()->getDatabaseName();
}

// Will select default database if name is null
Expand Down

0 comments on commit cbed71c

Please sign in to comment.