{"action":"created","issue":{"url":"https://api.github.com/repos/neo4jrb/neo4j/issues/713","labels_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/713/labels{/name}","comments_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/713/comments","events_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/713/events","html_url":"https://github.com/neo4jrb/neo4j/pull/713","id":60269691,"number":713,"title":"Fix bug in delete_all: relations should be matched optionally","user":{"login":"garmoshka-mo","id":2452269,"avatar_url":"https://avatars.githubusercontent.com/u/2452269?v=3","gravatar_id":"","url":"https://api.github.com/users/garmoshka-mo","html_url":"https://github.com/garmoshka-mo","followers_url":"https://api.github.com/users/garmoshka-mo/followers","following_url":"https://api.github.com/users/garmoshka-mo/following{/other_user}","gists_url":"https://api.github.com/users/garmoshka-mo/gists{/gist_id}","starred_url":"https://api.github.com/users/garmoshka-mo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garmoshka-mo/subscriptions","organizations_url":"https://api.github.com/users/garmoshka-mo/orgs","repos_url":"https://api.github.com/users/garmoshka-mo/repos","events_url":"https://api.github.com/users/garmoshka-mo/events{/privacy}","received_events_url":"https://api.github.com/users/garmoshka-mo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-08T18:33:59Z","updated_at":"2015-03-08T22:22:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neo4jrb/neo4j/pulls/713","html_url":"https://github.com/neo4jrb/neo4j/pull/713","diff_url":"https://github.com/neo4jrb/neo4j/pull/713.diff","patch_url":"https://github.com/neo4jrb/neo4j/pull/713.patch"},"body":"Otherwise you trap in situation, when nodes without relationships are ignored and stay in database"},"comment":{"url":"https://api.github.com/repos/neo4jrb/neo4j/issues/comments/77778320","html_url":"https://github.com/neo4jrb/neo4j/pull/713#issuecomment-77778320","issue_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/713","id":77778320,"user":{"login":"garmoshka-mo","id":2452269,"avatar_url":"https://avatars.githubusercontent.com/u/2452269?v=3","gravatar_id":"","url":"https://api.github.com/users/garmoshka-mo","html_url":"https://github.com/garmoshka-mo","followers_url":"https://api.github.com/users/garmoshka-mo/followers","following_url":"https://api.github.com/users/garmoshka-mo/following{/other_user}","gists_url":"https://api.github.com/users/garmoshka-mo/gists{/gist_id}","starred_url":"https://api.github.com/users/garmoshka-mo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garmoshka-mo/subscriptions","organizations_url":"https://api.github.com/users/garmoshka-mo/orgs","repos_url":"https://api.github.com/users/garmoshka-mo/repos","events_url":"https://api.github.com/users/garmoshka-mo/events{/privacy}","received_events_url":"https://api.github.com/users/garmoshka-mo/received_events","type":"User","site_admin":false},"created_at":"2015-03-08T22:22:18Z","updated_at":"2015-03-08T22:22:18Z","body":"Unfortunately was unable to run rspec:\r\n\r\n```\r\nvagrant@precise32:~/ruby-test/lib/neo4j$ rspec spec/e2e/query_proxy_methods_spec.rb -e 'delete_all'\r\n/usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:386:in `load': /home/vagrant/ruby-test/lib/neo4j/spec/e2e/query_proxy_methods_spec.rb:11: syntax error, unexpected ':', expecting kEND (SyntaxError)\r\n...y :out, :lessons, model_class: 'Lesson', rel_class: 'Enrolle...\r\n                              ^\r\n/home/vagrant/ruby-test/lib/neo4j/spec/e2e/query_proxy_methods_spec.rb:11: syntax error, unexpected ',', expecting kEND\r\n...essons, model_class: 'Lesson', rel_class: 'EnrolledIn'\r\n                              ^\r\n/home/vagrant/ruby-test/lib/neo4j/spec/e2e/query_proxy_methods_spec.rb:12: syntax error, unexpected ':', expecting kEND\r\n      has_many :out, :things, model_class: false, type: 'lessons'\r\n                                          ^\r\n/home/vagrant/ruby-test/lib/neo4j/spec/e2e/query_proxy_methods_spec.rb:12: Can't assign to false\r\n      has_many :out, :things, model_class: false, type: 'lessons'\r\n\r\n\r\n....\r\n\r\n\r\n\r\nvagrant@precise32:~/ruby-test/lib/neo4j$ rspec -v\r\n2.5.1\r\n```\r\n\r\n\r\nBut on simple test language it would look like this:\r\n```\r\n  test 'make sure we can simply burn down everybody with given type' do\r\n    # Test - is ActiveNode with label :Test\r\n    Nodes::Test.create(name: 'Xuev Zhid')\r\n\r\n    Nodes::Test.all.delete_all\r\n\r\n    x = Neo4j::Session.query\r\n            .match('(n:Test)')\r\n            .pluck('count(n)').first.to_i\r\n    assert x == 0\r\n  end\r\n```\r\n\r\nUnless you have `optional_match` - this test will fail"}}