{"action":"created","issue":{"url":"https://api.github.com/repos/Flux159/cassie-odm/issues/3","labels_url":"https://api.github.com/repos/Flux159/cassie-odm/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Flux159/cassie-odm/issues/3/comments","events_url":"https://api.github.com/repos/Flux159/cassie-odm/issues/3/events","html_url":"https://github.com/Flux159/cassie-odm/issues/3","id":89168158,"number":3,"title":"Using cassie.types.Long in find results in invalid query","user":{"login":"sevenbitbyte","id":662932,"avatar_url":"https://avatars.githubusercontent.com/u/662932?v=3","gravatar_id":"","url":"https://api.github.com/users/sevenbitbyte","html_url":"https://github.com/sevenbitbyte","followers_url":"https://api.github.com/users/sevenbitbyte/followers","following_url":"https://api.github.com/users/sevenbitbyte/following{/other_user}","gists_url":"https://api.github.com/users/sevenbitbyte/gists{/gist_id}","starred_url":"https://api.github.com/users/sevenbitbyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevenbitbyte/subscriptions","organizations_url":"https://api.github.com/users/sevenbitbyte/orgs","repos_url":"https://api.github.com/users/sevenbitbyte/repos","events_url":"https://api.github.com/users/sevenbitbyte/events{/privacy}","received_events_url":"https://api.github.com/users/sevenbitbyte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-18T01:09:37Z","updated_at":"2015-06-18T01:20:58Z","closed_at":null,"body":"Using Model.find with an argument of type `cassie.type.Long` is incorrectly parsed and results in an invalid query string.\r\n\r\nExample model:\r\n\r\n```\r\ncassie.model(\r\n  'longtest',\r\n  new cassie.Schema({\r\n    field1 : {type: cassie.types.Long, index: true},\r\n    field2: cassie.types.uuid\r\n  });\r\n);\r\n```\r\n\r\nExample Model.find\r\n\r\n```\r\nvar query = cassie.model('longtest').find({ field1 : cassie.types.Long.fromString('12345678901234567890') });\r\n\r\nconsole.log(query);\r\n```\r\n\r\nProduces the query:\r\n```\r\n{ \r\n  queryString: 'SELECT * FROM longtest WHERE  ',\r\n  params: [ ],\r\n  toString: [Function],\r\n  limit: [Function],\r\n  sort: [Function],\r\n  page: [Function],\r\n  exec: [Function],\r\n  stream: [Function] }\r\n```\r\n\r\nThe query string should be valid andthe params array should contain the supplied long:\r\n\r\n```\r\nqueryString: 'SELECT * FROM longtest WHERE field1=? '\r\n```"},"comment":{"url":"https://api.github.com/repos/Flux159/cassie-odm/issues/comments/113001226","html_url":"https://github.com/Flux159/cassie-odm/issues/3#issuecomment-113001226","issue_url":"https://api.github.com/repos/Flux159/cassie-odm/issues/3","id":113001226,"user":{"login":"sevenbitbyte","id":662932,"avatar_url":"https://avatars.githubusercontent.com/u/662932?v=3","gravatar_id":"","url":"https://api.github.com/users/sevenbitbyte","html_url":"https://github.com/sevenbitbyte","followers_url":"https://api.github.com/users/sevenbitbyte/followers","following_url":"https://api.github.com/users/sevenbitbyte/following{/other_user}","gists_url":"https://api.github.com/users/sevenbitbyte/gists{/gist_id}","starred_url":"https://api.github.com/users/sevenbitbyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevenbitbyte/subscriptions","organizations_url":"https://api.github.com/users/sevenbitbyte/orgs","repos_url":"https://api.github.com/users/sevenbitbyte/repos","events_url":"https://api.github.com/users/sevenbitbyte/events{/privacy}","received_events_url":"https://api.github.com/users/sevenbitbyte/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T01:20:58Z","updated_at":"2015-06-18T01:20:58Z","body":"Another way to repro is calling the argument parser directly\r\n\r\n```\r\nparseArguments({field1: { low: 964128835, high: 28, unsigned: undefined }}, 'primaryKey')\r\n```"}}