{"action":"created","issue":{"url":"https://api.github.com/repos/propelorm/Propel/issues/1027","repository_url":"https://api.github.com/repos/propelorm/Propel","labels_url":"https://api.github.com/repos/propelorm/Propel/issues/1027/labels{/name}","comments_url":"https://api.github.com/repos/propelorm/Propel/issues/1027/comments","events_url":"https://api.github.com/repos/propelorm/Propel/issues/1027/events","html_url":"https://github.com/propelorm/Propel/issues/1027","id":163109100,"number":1027,"title":"Propel is returning an unexpected number of rows","user":{"login":"sinjuice","id":11692467,"avatar_url":"https://avatars.githubusercontent.com/u/11692467?v=3","gravatar_id":"","url":"https://api.github.com/users/sinjuice","html_url":"https://github.com/sinjuice","followers_url":"https://api.github.com/users/sinjuice/followers","following_url":"https://api.github.com/users/sinjuice/following{/other_user}","gists_url":"https://api.github.com/users/sinjuice/gists{/gist_id}","starred_url":"https://api.github.com/users/sinjuice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinjuice/subscriptions","organizations_url":"https://api.github.com/users/sinjuice/orgs","repos_url":"https://api.github.com/users/sinjuice/repos","events_url":"https://api.github.com/users/sinjuice/events{/privacy}","received_events_url":"https://api.github.com/users/sinjuice/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-30T08:26:53Z","updated_at":"2016-06-30T08:44:41Z","closed_at":null,"body":"\r\n\r\nI'm trying to execute a query using propel and it should return 50 rows of data, but instead of that it returns other random number of rows. I printed the query copied in my pgphpadmin and it returns the 50 rows. I'm not sure what is happening. Also if I execute \"count\" function before \"find\" it returns 50, but after it returns the random amount of rows.\r\n\r\n```\r\n$limit = 50;\r\n$offset = 0;\r\n..... //filters \r\n$companies = $companies->orderById()->limit($limit)->offset($offset);\r\nvar_dump($companies->count()); // this returns 50\r\n$companies = $companies->find();\r\nvar_dump($companies->count()); // this returns 13\r\n```\r\n\r\nAlso the foreach after iterates only 13 times.\r\n\r\nAnd this is the query generated\r\n\r\n```\r\nSELECT \"company\".\"id\", \"company\".\"otherfields\",\r\n\"lists\".\"id\", \"lists\".\"otherfields\", \"place\".\"id\",\r\n\"place\".\"otherfields\", \"contact\".\"id\", \"contact\".\"otherfields\", \r\n\"entry\".\"id\",\"entry\".\"otherfields\" \r\nFROM \"company\" LEFT JOIN \"lists\" ON \r\n(\"company\".\"sector_id\"=\"lists\".\"id\") LEFT JOIN \"place\" ON \r\n(\"company\".\"country_id\"=\"place\".\"id\") LEFT JOIN \"contact\" ON  \r\n(\"company\".\"id\"=\"contact\".\"company_id\" AND \"contact\".\"active\" = true)\r\nLEFT JOIN \"entry\" ON (\"company\".\"id\"=\"entry\".\"company_id\") \r\nWHERE \"company\".\"active\"=true ORDER BY \"company\".\"id\" ASC LIMIT 50 OFFSET 0\r\n```\r\n\r\nThe Propel version is 2.0-dev\r\n"},"comment":{"url":"https://api.github.com/repos/propelorm/Propel/issues/comments/229599024","html_url":"https://github.com/propelorm/Propel/issues/1027#issuecomment-229599024","issue_url":"https://api.github.com/repos/propelorm/Propel/issues/1027","id":229599024,"user":{"login":"staabm","id":120441,"avatar_url":"https://avatars.githubusercontent.com/u/120441?v=3","gravatar_id":"","url":"https://api.github.com/users/staabm","html_url":"https://github.com/staabm","followers_url":"https://api.github.com/users/staabm/followers","following_url":"https://api.github.com/users/staabm/following{/other_user}","gists_url":"https://api.github.com/users/staabm/gists{/gist_id}","starred_url":"https://api.github.com/users/staabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staabm/subscriptions","organizations_url":"https://api.github.com/users/staabm/orgs","repos_url":"https://api.github.com/users/staabm/repos","events_url":"https://api.github.com/users/staabm/events{/privacy}","received_events_url":"https://api.github.com/users/staabm/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T08:44:40Z","updated_at":"2016-06-30T08:44:40Z","body":"does this exact query return 50 rows if you execute it in your favorite sql editor?"}}
{"actor":{"display_login":"staabm"}}