{"action":"closed","issue":{"url":"https://api.github.com/repos/Marsup/hapi-mongodb/issues/17","labels_url":"https://api.github.com/repos/Marsup/hapi-mongodb/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/Marsup/hapi-mongodb/issues/17/comments","events_url":"https://api.github.com/repos/Marsup/hapi-mongodb/issues/17/events","html_url":"https://github.com/Marsup/hapi-mongodb/issues/17","id":90724325,"number":17,"title":"Ability to access other types from database besides ObjectID","user":{"login":"mattymcgee","id":5590876,"avatar_url":"https://avatars.githubusercontent.com/u/5590876?v=3","gravatar_id":"","url":"https://api.github.com/users/mattymcgee","html_url":"https://github.com/mattymcgee","followers_url":"https://api.github.com/users/mattymcgee/followers","following_url":"https://api.github.com/users/mattymcgee/following{/other_user}","gists_url":"https://api.github.com/users/mattymcgee/gists{/gist_id}","starred_url":"https://api.github.com/users/mattymcgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattymcgee/subscriptions","organizations_url":"https://api.github.com/users/mattymcgee/orgs","repos_url":"https://api.github.com/users/mattymcgee/repos","events_url":"https://api.github.com/users/mattymcgee/events{/privacy}","received_events_url":"https://api.github.com/users/mattymcgee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Marsup/hapi-mongodb/labels/question","name":"question","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"Marsup","id":796194,"avatar_url":"https://avatars.githubusercontent.com/u/796194?v=3","gravatar_id":"","url":"https://api.github.com/users/Marsup","html_url":"https://github.com/Marsup","followers_url":"https://api.github.com/users/Marsup/followers","following_url":"https://api.github.com/users/Marsup/following{/other_user}","gists_url":"https://api.github.com/users/Marsup/gists{/gist_id}","starred_url":"https://api.github.com/users/Marsup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marsup/subscriptions","organizations_url":"https://api.github.com/users/Marsup/orgs","repos_url":"https://api.github.com/users/Marsup/repos","events_url":"https://api.github.com/users/Marsup/events{/privacy}","received_events_url":"https://api.github.com/users/Marsup/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-06-24T16:23:06Z","updated_at":"2015-06-24T22:37:30Z","closed_at":"2015-06-24T22:37:30Z","body":"Does this plugin have the ability to access types like string, int, etc from mongodb? In your example you show the retrieval of elements in your database based on ObjectID, but lets say I was trying to search for a specific string in my database and query all the elements connected to that string, like so:\r\n\r\n```javascript\r\nserver.route({\r\n\tmethod: 'GET',\r\n\tpath: '/test/cuisines/{cuisine}',\r\n\thandler: function(request, reply) {\r\n\t\tvar db = request.server.plugins['hapi-mongodb'].db;\r\n\t\tvar result = request.server.plugins['hapi-mongodb'].String;\r\n\r\n\t\tdb.collection('restaurants').findOne({\"cuisine\": new result(request.params.cuisine)}, function(err, result) {\r\n\t\t\tif(err) {\r\n\t\t\t\treturn reply(Boom.internal('Internal MongoDB error', err)); \r\n\t\t\t}\r\n\t\t\treply(result);\r\n\t\t});\r\n\t}\r\n});\r\n```"}}