{"issue":{"title":"Call to a member function count()","user":{"login":"osam","id":1198335,"url":"https://api.github.com/users/osam","avatar_url":"https://secure.gravatar.com/avatar/abafeefa0b7cbd7f49a83dd6da509dee?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"abafeefa0b7cbd7f49a83dd6da509dee"},"created_at":"2011-12-28T05:02:38Z","milestone":null,"labels":[{"name":"Awaiting feedback","url":"https://api.github.com/repos/fuel/orm/labels/Awaiting+feedback","color":"DDDDDD"},{"name":"Bug","url":"https://api.github.com/repos/fuel/orm/labels/Bug","color":"e10c02"},{"name":"Pending","url":"https://api.github.com/repos/fuel/orm/labels/Pending","color":"d7e102"}],"state":"closed","updated_at":"2011-12-28T20:45:18Z","id":2669136,"closed_at":"2011-12-28T20:45:18Z","html_url":"https://github.com/fuel/orm/issues/131","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"The docs say:\r\n\r\n$query = Model_Article::find()->where('category_id', 1)->order_by('date', 'desc');\r\n\r\n// We want to know the total number of articles for pagination\r\n$number_of_articles = $query->count();\r\n\r\nhttp://docs.fuelphp.com/packages/orm/crud.html\r\n\r\nThat gives ErrorException [ Error ]: Call to a member function count() on a non-object. However, this does work:\r\n\r\nModel_Article::count();","number":131,"url":"https://api.github.com/repos/fuel/orm/issues/131","comments":2,"assignee":null},"action":"closed"}