{"action":"created","issue":{"url":"https://api.github.com/repos/vadimdemedes/mongorito/issues/183","repository_url":"https://api.github.com/repos/vadimdemedes/mongorito","labels_url":"https://api.github.com/repos/vadimdemedes/mongorito/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/vadimdemedes/mongorito/issues/183/comments","events_url":"https://api.github.com/repos/vadimdemedes/mongorito/issues/183/events","html_url":"https://github.com/vadimdemedes/mongorito/issues/183","id":236453009,"number":183,"title":"Handling of ObjectId properties","user":{"login":"henit","id":2526740,"avatar_url":"https://avatars0.githubusercontent.com/u/2526740?v=3","gravatar_id":"","url":"https://api.github.com/users/henit","html_url":"https://github.com/henit","followers_url":"https://api.github.com/users/henit/followers","following_url":"https://api.github.com/users/henit/following{/other_user}","gists_url":"https://api.github.com/users/henit/gists{/gist_id}","starred_url":"https://api.github.com/users/henit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henit/subscriptions","organizations_url":"https://api.github.com/users/henit/orgs","repos_url":"https://api.github.com/users/henit/repos","events_url":"https://api.github.com/users/henit/events{/privacy}","received_events_url":"https://api.github.com/users/henit/received_events","type":"User","site_admin":false},"labels":[{"id":297546931,"url":"https://api.github.com/repos/vadimdemedes/mongorito/labels/question","name":"question","color":"fef2c0","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-16T11:11:11Z","updated_at":"2017-06-29T10:23:30Z","closed_at":"2017-06-27T13:00:40Z","body":"Hi. I think Mongorito looks very nice, and consider using it. Two questions:\r\n\r\n1. In normal direct queries to a database (using the mongodb-driver), properties saved as ObjectId has to be cast to ObjectId. Like if I run `category.find({ parentCategory: 'abcdef' })` it does not find any documents, I have to convert the id-string before passing it as a query condition. Is this the same with Mongorito, or is there a way to avoid this?\r\n\r\n2. And, is it with Mongorito possible to get all ObjectId properties on documents returned by find operations etc converted to strings so I don't have to do this manually? And the same for converting back before insert/update operations."},"comment":{"url":"https://api.github.com/repos/vadimdemedes/mongorito/issues/comments/311925907","html_url":"https://github.com/vadimdemedes/mongorito/issues/183#issuecomment-311925907","issue_url":"https://api.github.com/repos/vadimdemedes/mongorito/issues/183","id":311925907,"user":{"login":"henit","id":2526740,"avatar_url":"https://avatars0.githubusercontent.com/u/2526740?v=3","gravatar_id":"","url":"https://api.github.com/users/henit","html_url":"https://github.com/henit","followers_url":"https://api.github.com/users/henit/followers","following_url":"https://api.github.com/users/henit/following{/other_user}","gists_url":"https://api.github.com/users/henit/gists{/gist_id}","starred_url":"https://api.github.com/users/henit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henit/subscriptions","organizations_url":"https://api.github.com/users/henit/orgs","repos_url":"https://api.github.com/users/henit/repos","events_url":"https://api.github.com/users/henit/events{/privacy}","received_events_url":"https://api.github.com/users/henit/received_events","type":"User","site_admin":false},"created_at":"2017-06-29T10:23:30Z","updated_at":"2017-06-29T10:23:30Z","body":"@vadimdemedes Btw, about the compatibility issue you mentioned.. Could that have been solved with an optional feature? Like enabling an option that triggers automatic casting, so people that need to cast manually can just skip enabling autocast, and the rest of us can avoid repeated casting syntaces all over our code..."}}
{"actor":{"display_login":"henit"}}