{"action":"created","issue":{"url":"https://api.github.com/repos/baopham/laravel-dynamodb/issues/20","repository_url":"https://api.github.com/repos/baopham/laravel-dynamodb","labels_url":"https://api.github.com/repos/baopham/laravel-dynamodb/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/baopham/laravel-dynamodb/issues/20/comments","events_url":"https://api.github.com/repos/baopham/laravel-dynamodb/issues/20/events","html_url":"https://github.com/baopham/laravel-dynamodb/issues/20","id":151531240,"number":20,"title":"Using same instance of the model","user":{"login":"rsands2801","id":5500424,"avatar_url":"https://avatars.githubusercontent.com/u/5500424?v=3","gravatar_id":"","url":"https://api.github.com/users/rsands2801","html_url":"https://github.com/rsands2801","followers_url":"https://api.github.com/users/rsands2801/followers","following_url":"https://api.github.com/users/rsands2801/following{/other_user}","gists_url":"https://api.github.com/users/rsands2801/gists{/gist_id}","starred_url":"https://api.github.com/users/rsands2801/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsands2801/subscriptions","organizations_url":"https://api.github.com/users/rsands2801/orgs","repos_url":"https://api.github.com/users/rsands2801/repos","events_url":"https://api.github.com/users/rsands2801/events{/privacy}","received_events_url":"https://api.github.com/users/rsands2801/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-28T01:53:57Z","updated_at":"2016-04-28T03:02:54Z","closed_at":null,"body":"When we call a query e.g.\r\n\r\n```\r\n$count = Analytics::where('columnA', '524352')\r\n                    ->where('columnB', $source)\r\n                    ->where('columnC', '=', $date)\r\n                    ->get();\r\n```\r\n\r\nthen proceed to call\r\n\r\n```\r\n$campaign_sources = Analytics::where('columnA', '524352')->get();\r\n```\r\n\r\nthe second query fails with an empty array.  If the previous query returned empty results any subsequent calls to Analytics:: will fail with an empty result.  It is not created a new model class,.\r\n\r\nIf i do this:\r\n\r\n```\r\nnew Analytics();\r\n$campaign_sources = Analytics::where('columnA', '524352')->get();\r\n```\r\n\r\nthe above works as I manually triggered a new Analytics before the second query."},"comment":{"url":"https://api.github.com/repos/baopham/laravel-dynamodb/issues/comments/215297336","html_url":"https://github.com/baopham/laravel-dynamodb/issues/20#issuecomment-215297336","issue_url":"https://api.github.com/repos/baopham/laravel-dynamodb/issues/20","id":215297336,"user":{"login":"rsands2801","id":5500424,"avatar_url":"https://avatars.githubusercontent.com/u/5500424?v=3","gravatar_id":"","url":"https://api.github.com/users/rsands2801","html_url":"https://github.com/rsands2801","followers_url":"https://api.github.com/users/rsands2801/followers","following_url":"https://api.github.com/users/rsands2801/following{/other_user}","gists_url":"https://api.github.com/users/rsands2801/gists{/gist_id}","starred_url":"https://api.github.com/users/rsands2801/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsands2801/subscriptions","organizations_url":"https://api.github.com/users/rsands2801/orgs","repos_url":"https://api.github.com/users/rsands2801/repos","events_url":"https://api.github.com/users/rsands2801/events{/privacy}","received_events_url":"https://api.github.com/users/rsands2801/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T03:02:54Z","updated_at":"2016-04-28T03:02:54Z","body":"No problem, it also fails when passing in multiple where conditions for the same column name"}}