/** * Finds a BeanCollection. * * @param string $type type of beans you are looking for * @param string $sql SQL to be used in query * @param array $bindings whether you prefer to use a WHERE clause or not (TRUE = not) * * @return BeanCollection */ public function findCollection($type, $sql, $bindings = array()) { try { $cursor = $this->writer->queryRecordWithCursor($type, $sql, $bindings); return new BeanCollection($type, $this, $cursor); } catch (SQLException $exception) { $this->handleException($exception); } return new BeanCollection($type, $this, new NullCursor()); }