Skip to content

Commit a4efbd4

Browse files
committed
Merge pull request #177 from ZEALi/patch-1
Update FluentAdapter.php
2 parents 622cca5 + 8113241 commit a4efbd4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Storage/FluentAdapter.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public function setConnectionName($connectionName)
4949

5050
protected function getConnection()
5151
{
52-
return $this->resolver->connection($this->connectionName);
52+
$conn = $this->resolver->connection($this->connectionName);
53+
// maybe others have the database config for fetch mode to PDO::FETCH_ASSOC
54+
// u'd better force it back here, or all your data fetching result will be unusable.
55+
$conn->setFetchMode(\PDO::FETCH_OBJ);
56+
return $conn;
5357
}
54-
}
58+
}

0 commit comments

Comments
 (0)