diff --git a/doctrine.rst b/doctrine.rst index eab24ae8f13..fb491df8c2b 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -812,7 +812,7 @@ In addition, you can query directly with SQL if you need to:: $stmt->execute(['price' => $price]); // returns an array of arrays (i.e. a raw data set) - return $stmt->fetchAll(); + return $stmt->fetchAllAssociative(); } With SQL, you will get back raw data, not objects (unless you use the `NativeQuery`_