{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/1519","repository_url":"https://api.github.com/repos/balderdashy/waterline","labels_url":"https://api.github.com/repos/balderdashy/waterline/issues/1519/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/waterline/issues/1519/comments","events_url":"https://api.github.com/repos/balderdashy/waterline/issues/1519/events","html_url":"https://github.com/balderdashy/waterline/pull/1519","id":253078305,"number":1519,"title":"[fixes #1489] Add meta flag for 'unsafe' queries","user":{"login":"mdconaway","id":8126171,"avatar_url":"https://avatars1.githubusercontent.com/u/8126171?v=4","gravatar_id":"","url":"https://api.github.com/users/mdconaway","html_url":"https://github.com/mdconaway","followers_url":"https://api.github.com/users/mdconaway/followers","following_url":"https://api.github.com/users/mdconaway/following{/other_user}","gists_url":"https://api.github.com/users/mdconaway/gists{/gist_id}","starred_url":"https://api.github.com/users/mdconaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdconaway/subscriptions","organizations_url":"https://api.github.com/users/mdconaway/orgs","repos_url":"https://api.github.com/users/mdconaway/repos","events_url":"https://api.github.com/users/mdconaway/events{/privacy}","received_events_url":"https://api.github.com/users/mdconaway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-08-26T09:25:11Z","updated_at":"2017-10-01T00:40:00Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/balderdashy/waterline/pulls/1519","html_url":"https://github.com/balderdashy/waterline/pull/1519","diff_url":"https://github.com/balderdashy/waterline/pull/1519.diff","patch_url":"https://github.com/balderdashy/waterline/pull/1519.patch"},"body":"Add meta flag for 'unsafe' queries\r\n\r\nThis closes issue #1489"},"comment":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/comments/333345426","html_url":"https://github.com/balderdashy/waterline/pull/1519#issuecomment-333345426","issue_url":"https://api.github.com/repos/balderdashy/waterline/issues/1519","id":333345426,"user":{"login":"mikermcneil","id":618009,"avatar_url":"https://avatars3.githubusercontent.com/u/618009?v=4","gravatar_id":"","url":"https://api.github.com/users/mikermcneil","html_url":"https://github.com/mikermcneil","followers_url":"https://api.github.com/users/mikermcneil/followers","following_url":"https://api.github.com/users/mikermcneil/following{/other_user}","gists_url":"https://api.github.com/users/mikermcneil/gists{/gist_id}","starred_url":"https://api.github.com/users/mikermcneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikermcneil/subscriptions","organizations_url":"https://api.github.com/users/mikermcneil/orgs","repos_url":"https://api.github.com/users/mikermcneil/repos","events_url":"https://api.github.com/users/mikermcneil/events{/privacy}","received_events_url":"https://api.github.com/users/mikermcneil/received_events","type":"User","site_admin":false},"created_at":"2017-10-01T00:40:00Z","updated_at":"2017-10-01T00:40:00Z","author_association":"OWNER","body":"@mdconaway really appreciate you taking the time to detail the background here, and staying positive :)\r\n\r\n> we need to do searches and sorts against nested key values\r\n\r\nI recognize you're going for a short-term solution here since you need this asap, and your fork seems to be an appropriate solution for that.  So first off, don't worry-- it's totally fine for you to use that (I don't anticipate there being any more major upheavals in how the files related to the query forge are structured any time in the near to medium-term future). \r\n\r\n---\r\n\r\nAs far as what we merge into core, I have to make sure whatever we do here also lines up with the plan going forward, which includes supporting this kind of usage.  \r\n\r\nI'm currently in the middle of a vaguely-related effort: changing the default behavior so that it avoids destructively mutating arguments from userland by default (but still allowing destructive mutation if configured to do so, via a meta key).  Thus I'm trying my best not to conflict with what's in this PR, but it looks like it might be unavoidable...  I just took another look through to get a sense of which of my changes might cause a problem, and the issue is that I also need to send through `meta` to some of the deeper-nested utility functions.  So before I do that and mess anything up, I wanted to figure out what do to support your use case longer term.\r\n\r\nI'm wondering if it'd maybe be cleaner/faster to just to go ahead and take the plunge into allowing dot notation (`foo.bar.baz`) instead of attribute names for constraints.  Or something equivalent anyway.  (And obviously this would only be usable for adapters that support it.)\r\n\r\nBut first, just to make 100% sure:\r\n• is the nested `foo.bar.baz`-style syntax for eq constraints the only blocker right now?\r\n• is it just for looking up stuff within type: 'json' and type: 'ref' attributes?\r\n• how attached are you to dot notation as far as syntax?  e.g. rather than `dog.collar.color: 'red'`, another option would be something like `dog: { whose: { collar: {whose: {color: 'red'}} }`.  I'm not saying that's better or worse per se, but I'm just trying to get a sense.  As you probably noticed when exploring the stage 3 query stuff, there are a few edge cases (e.g. through tables) that make anything that relies on dots a little worrisome (and potentially bug-prone)\r\n\r\nI'm heading out the door right now, but I'm planning to take a deeper dive into this tomorrow while I have some time, so we can hopefully have a resolution by the end of this weekend.\r\n\r\n(refs https://github.com/balderdashy/waterline/issues/1489)"}}
{"actor":{"display_login":"mikermcneil"}}