{"action":"closed","pull_request":{"state":"closed","created_at":"2011-08-28T20:02:52Z","review_comments":4,"patch_url":"https://github.com/fuel/docs/pull/173.patch","updated_at":"2011-12-09T22:40:17Z","changed_files":2,"_links":{"review_comments":{"href":"https://api.github.com/repos/fuel/docs/pulls/173/comments"},"comments":{"href":"https://api.github.com/repos/fuel/docs/issues/173/comments"},"html":{"href":"https://github.com/fuel/docs/pull/173"},"self":{"href":"https://api.github.com/repos/fuel/docs/pulls/173"}},"comments":4,"issue_url":"https://github.com/fuel/docs/issues/173","user":{"gravatar_id":"210316d8423d1616467281a4faea2b37","id":352074,"url":"https://api.github.com/users/leonardteo","avatar_url":"https://secure.gravatar.com/avatar/210316d8423d1616467281a4faea2b37?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leonardteo"},"merged":false,"body":"Updated two pages:\r\n* crud.html\r\n* models.html\r\n\r\n# crud.html\r\nFind first/last - the example given was actually incorrect. Based on what I see in 1.01 core, a find('first'/'last..) will always return you a record by sorting by primary key. Adding an orderby clause doesn't seem to do anything.\r\n\r\nThere were errors with some of the code when passing in where clauses...\r\n$entries = Model_Article::find('all', array(\r\n\t'where' => array(\r\n\t\tarray('category_id', 1),    //This is incorrect and will throw an exception\r\n\t),\r\n\t'order_by' => array('date' => 'desc'),\r\n));\r\n\r\n$entries = Model_Article::find('all', array(\r\n\t'where' => array(\r\n\t\tarray('category_id' => 1),    //This is correct\r\n\t),\r\n\t'order_by' => array('date' => 'desc'),\r\n));\r\n\r\n\r\nAlso....I changed the $entry to $entries (plural) for methods that return an array.\r\n\r\nAdded some descriptions \r\n\r\n# models.html\r\nFixed where clause","deletions":8,"commits":10,"mergeable":false,"id":295054,"additions":8,"base":{"repo":{"created_at":"2010-11-01T13:16:49Z","pushed_at":"2011-12-09T22:38:15Z","updated_at":"2011-12-09T22:38:16Z","private":false,"clone_url":"https://github.com/fuel/docs.git","name":"docs","watchers":152,"svn_url":"https://svn.github.com/fuel/docs","master_branch":"1.1/develop","forks":100,"language":"JavaScript","owner":{"gravatar_id":"dcf6733b1b21febe8c1c4ba90d56f39a","id":452101,"url":"https://api.github.com/users/fuel","avatar_url":"https://secure.gravatar.com/avatar/dcf6733b1b21febe8c1c4ba90d56f39a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"fuel"},"id":1041750,"homepage":"http://fuelphp.com/docs","description":"Documentation for FuelPHP","git_url":"git://github.com/fuel/docs.git","html_url":"https://github.com/fuel/docs","open_issues":14,"size":1752,"url":"https://api.github.com/repos/fuel/docs","fork":false,"ssh_url":"git@github.com:fuel/docs.git"},"user":{"gravatar_id":"dcf6733b1b21febe8c1c4ba90d56f39a","id":452101,"url":"https://api.github.com/users/fuel","avatar_url":"https://secure.gravatar.com/avatar/dcf6733b1b21febe8c1c4ba90d56f39a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"fuel"},"sha":"76b442594e1141fedad23e8ecedeb98992e81fd9","ref":"1.1/develop","label":"fuel:1.1/develop"},"number":173,"merged_by":null,"head":{"repo":{"created_at":"2011-08-27T01:22:06Z","pushed_at":"2011-10-21T14:08:45Z","updated_at":"2011-10-21T14:08:46Z","private":false,"clone_url":"https://github.com/ballistiq/fuelphp_docs.git","name":"fuelphp_docs","watchers":1,"svn_url":"https://svn.github.com/ballistiq/fuelphp_docs","master_branch":"1.1/develop","forks":0,"language":"JavaScript","owner":{"gravatar_id":"0af1013ae19fa6a1749427227a782e54","id":722378,"url":"https://api.github.com/users/ballistiq","avatar_url":"https://secure.gravatar.com/avatar/0af1013ae19fa6a1749427227a782e54?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"ballistiq"},"id":2277478,"homepage":"http://fuelphp.com","description":"Documentation for Fuel","git_url":"git://github.com/ballistiq/fuelphp_docs.git","html_url":"https://github.com/ballistiq/fuelphp_docs","open_issues":0,"size":136,"url":"https://api.github.com/repos/ballistiq/fuelphp_docs","fork":true,"ssh_url":"git@github.com:ballistiq/fuelphp_docs.git"},"user":{"gravatar_id":"0af1013ae19fa6a1749427227a782e54","id":722378,"url":"https://api.github.com/users/ballistiq","avatar_url":"https://secure.gravatar.com/avatar/0af1013ae19fa6a1749427227a782e54?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"ballistiq"},"sha":"e33f2d52752d8be15364cbe0e69b613dadda3b92","ref":"1.1/develop","label":"ballistiq:1.1/develop"},"title":"ORM page fixes....","html_url":"https://github.com/fuel/docs/pull/173","closed_at":"2011-12-09T22:40:17Z","diff_url":"https://github.com/fuel/docs/pull/173.diff","url":"https://api.github.com/repos/fuel/docs/pulls/173","merged_at":null},"number":173}