{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/7023","repository_url":"https://api.github.com/repos/neo4j/neo4j","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/7023/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/7023/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/7023/events","html_url":"https://github.com/neo4j/neo4j/issues/7023","id":150541751,"number":7023,"title":"Feature request: Allow consistent use of map parameters","user":{"login":"rationalism","id":813306,"avatar_url":"https://avatars.githubusercontent.com/u/813306?v=3","gravatar_id":"","url":"https://api.github.com/users/rationalism","html_url":"https://github.com/rationalism","followers_url":"https://api.github.com/users/rationalism/followers","following_url":"https://api.github.com/users/rationalism/following{/other_user}","gists_url":"https://api.github.com/users/rationalism/gists{/gist_id}","starred_url":"https://api.github.com/users/rationalism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rationalism/subscriptions","organizations_url":"https://api.github.com/users/rationalism/orgs","repos_url":"https://api.github.com/users/rationalism/repos","events_url":"https://api.github.com/users/rationalism/events{/privacy}","received_events_url":"https://api.github.com/users/rationalism/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neo4j/neo4j/labels/cypher","name":"cypher","color":"009800"},{"url":"https://api.github.com/repos/neo4j/neo4j/labels/feature","name":"feature","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-23T10:30:44Z","updated_at":"2016-06-16T09:13:55Z","closed_at":"2016-06-16T09:13:54Z","body":"In Neo4j 2.3.3, this query runs well:\r\n\r\n[\"MATCH (n) WHERE {props} RETURN n\" {:props {\"name\" \"Bob Smith\" \"age\" 42 \"city\" \"Brooklyn, New York\"}}]\r\n\r\nbut this query throws a \"Parameter maps cannot be used in MATCH patterns (use a literal map instead, eg. \\\"{id: {param}.id}\\\" exception, and returns with a status 400:\r\n\r\n[\"MATCH (n {props}) RETURN n\" {:props {\"name\" \"Bob Smith\" \"age\" 42 \"city\" \"Brooklyn, New York\"}}]\r\n\r\nIt seems like these two queries essentially do the same thing. For consistency, could Cypher allow the second, as well as the first? I know that not explicitly naming the properties might make execution plan caching less efficient. But what I wound up doing (before I realized that the first query worked fine) was writing my own functions to convert from this:\r\n\r\n{\"name\" \"Bob Smith\" \"age\" 42 \"city\" \"Brooklyn, New York\"}\r\n\r\nto this:\r\n\r\n[\"MATCH (n { name:{name}, age:{age}, city:{city} })\" {:name \"Bob Smith\" :age 42 :city \"Brooklyn, New York\"}]\r\n\r\nby concatenating together little bits of strings, which I think is just as inefficient, and also much more prone to bugs. Thanks.\r\n\r\nRelevant StackOverflow threads:\r\n\r\nhttp://stackoverflow.com/questions/24211261/can-i-parameterize-labels-and-properties-on-create-or-set-rest-and-transaction\r\nhttp://stackoverflow.com/questions/28716699/parameter-maps-cannot-be-used-in-merge-patterns\r\nhttp://stackoverflow.com/questions/27094532/java-neo4j-cypher-query-to-match-node\r\n\r\nRelevant previous issue, #1525"},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/comments/226431317","html_url":"https://github.com/neo4j/neo4j/issues/7023#issuecomment-226431317","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/7023","id":226431317,"user":{"login":"rationalism","id":813306,"avatar_url":"https://avatars.githubusercontent.com/u/813306?v=3","gravatar_id":"","url":"https://api.github.com/users/rationalism","html_url":"https://github.com/rationalism","followers_url":"https://api.github.com/users/rationalism/followers","following_url":"https://api.github.com/users/rationalism/following{/other_user}","gists_url":"https://api.github.com/users/rationalism/gists{/gist_id}","starred_url":"https://api.github.com/users/rationalism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rationalism/subscriptions","organizations_url":"https://api.github.com/users/rationalism/orgs","repos_url":"https://api.github.com/users/rationalism/repos","events_url":"https://api.github.com/users/rationalism/events{/privacy}","received_events_url":"https://api.github.com/users/rationalism/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T09:13:54Z","updated_at":"2016-06-16T09:13:54Z","body":"Closing, thanks"}}
{"actor":{"display_login":"rationalism"}}