{"action":"created","issue":{"url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1223","repository_url":"https://api.github.com/repos/neo4jrb/neo4j","labels_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1223/labels{/name}","comments_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1223/comments","events_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1223/events","html_url":"https://github.com/neo4jrb/neo4j/issues/1223","id":160770403,"number":1223,"title":"QueryProxy returning ActiveNodes of wrong types","user":{"login":"bloomdido","id":840700,"avatar_url":"https://avatars.githubusercontent.com/u/840700?v=3","gravatar_id":"","url":"https://api.github.com/users/bloomdido","html_url":"https://github.com/bloomdido","followers_url":"https://api.github.com/users/bloomdido/followers","following_url":"https://api.github.com/users/bloomdido/following{/other_user}","gists_url":"https://api.github.com/users/bloomdido/gists{/gist_id}","starred_url":"https://api.github.com/users/bloomdido/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bloomdido/subscriptions","organizations_url":"https://api.github.com/users/bloomdido/orgs","repos_url":"https://api.github.com/users/bloomdido/repos","events_url":"https://api.github.com/users/bloomdido/events{/privacy}","received_events_url":"https://api.github.com/users/bloomdido/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-06-16T21:56:24Z","updated_at":"2016-08-04T18:51:41Z","closed_at":null,"body":"This issue is referenced by #1219, but is actually a separate issue.\r\n\r\n```\r\nclass Place\r\n  include Neo4j::ActiveNode\r\nend\r\n\r\nmodule DataSource\r\n  class URL\r\n    include Neo4j::ActiveNode\r\n  end\r\n\r\n  class Place < DataSource::URL\r\n    // inherits from DataSource::URL, but NOT from ::Place\r\n    // labels are :URL and :Place\r\n  end\r\nend\r\n\r\n::Place.all # => returns instances of both ::Place and DataSource::Place\r\n```\r\n\r\n`::Place.all` does a MATCH on the label `:Place`, which will return nodes that map to the `DataSource::Place` model, as well as the `::Place` model (and any true subclasses). However, `::Place.all`, and any other class-based query, should filter out anything that is not an instance of `::Place`."},"comment":{"url":"https://api.github.com/repos/neo4jrb/neo4j/issues/comments/237647965","html_url":"https://github.com/neo4jrb/neo4j/issues/1223#issuecomment-237647965","issue_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1223","id":237647965,"user":{"login":"bloomdido","id":840700,"avatar_url":"https://avatars.githubusercontent.com/u/840700?v=3","gravatar_id":"","url":"https://api.github.com/users/bloomdido","html_url":"https://github.com/bloomdido","followers_url":"https://api.github.com/users/bloomdido/followers","following_url":"https://api.github.com/users/bloomdido/following{/other_user}","gists_url":"https://api.github.com/users/bloomdido/gists{/gist_id}","starred_url":"https://api.github.com/users/bloomdido/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bloomdido/subscriptions","organizations_url":"https://api.github.com/users/bloomdido/orgs","repos_url":"https://api.github.com/users/bloomdido/repos","events_url":"https://api.github.com/users/bloomdido/events{/privacy}","received_events_url":"https://api.github.com/users/bloomdido/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T18:51:41Z","updated_at":"2016-08-04T18:51:41Z","body":"No problem - I took a 3 week detour into Docker and AWS myself.\r\n\r\nBut I am back on this and have discovered a few things.\r\n\r\nI am 100% committed to building an implementation that does not rely on a one-to-one mapping of labels-to-classes, but rather uses labels as an indication of functionality (via modules). That's how I've modeled my data in Neo4j, and I need to make my Ruby code match up.\r\n\r\nI've thought that perhaps what I'm looking to build is an alternative to ActiveNode. It seems to me that ActiveNode takes much of its inspiration from ActiveRecord, and in doing so, inherits many of its limitations as well. Neo4j (and graph databases in general) allow for far more flexible modeling of data than SQL, and it seems like Ruby should be a perfect match in flexibility. However, as I look at what I'd like to change about ActiveNode to allow for that, I realize that 80% of the functionality is shared, and creating an entirely new library seems like a waste. So either I need to figure out how to integrate the flexibility that I'm looking for into ActiveNode *without* losing the ActiveRecord-like inspiration that makes it easy to adopt for seasoned Rails developer, or I need to factor out the shared code between ActiveNode and my implementation such that it can service both in a maintainable fashion.\r\n\r\nAnyway - this topic is veering off the issue of how to properly map a collection of Neo4j labels to the proper ActiveNode model. I'd love to chat with you about my ideas and how they relate to ActiveNode in its current and/or future forms, so perhaps we can take it offline sometime."}}
{"actor":{"display_login":"bloomdido"}}