--
You received this message because you are subscribed to the Google Groups "neo4jrb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
class Owns include Neo4j::ActiveRel
from_class User to_class Post type :owns
property :kind, type: Integer property :quality, type: Float property :weight, type: Float
end
has_many :out, :concepts, rel_class: :owns
has_many :in, :users, origin: :users
var query = {"statements": [{ "statement": "MATCH (u:User {author: 'Jack'})-[r:owns]->(p:Post) RETURN r, p", "resultDataContents": ["graph"]}]};
$.ajax({ type: "POST", accept: "application/json", contentType: "application/json; charset=utf-8", data: JSON.stringify(query), success: function(data, textStatus, jqXHR) { console.log(data) }, failure: function(msg) { console.log("failed") }});
Hi Jan,The accessor methods are generated based on the second argument, not the `type` of the relationship. In your example you'd do `User.first.posts` or `Post.first.users`.Let us know if you have any trouble!Best,
Chris
--Hi,I have an existing Neo4J Database, which I have connected to a RoR Application. Since the db is already seeded I had to generate the migration file to add the uuids for the nodes, this worked. I have also existing relationships between those nodes (some of them have properties), e.g.: (u:User)-[:owns {property: 'value'}]->(p:Post) Currently I ignore the properties, and have added the owns-association to the User Model like this:has_many :out, :posts, type: :ownsAnd to the Post model like this:has_many :in, :users, origin: :usersIn the Rails console User.first or Post.first work, however when I enter something like User.first.owns I get: NoMethodError: undefined method `owns' for #<User:0x007fdd869b8aa0>Do I have to migrate somehow the relationships / associations? Thank you in advance for your responses!
You received this message because you are subscribed to the Google Groups "neo4jrb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+unsubscribe@googlegroups.com.
Chris
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "neo4jrb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.
"resultDataContents": ["graph"]
@user.posts.each_with_rel
...
@query = @user.posts.each_with_rel respond_to do |format| format.html format.json { render json: @query } end...
<%= javascript_tag do %> query = '<%= @query %>'$.getJSON(query + '.json', function(data) { console.log(data);});<% end %>
Chris
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+unsubscribe@googlegroups.com.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
Chris
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "neo4jrb" group.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
Chris
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+unsubscribe@googlegroups.com.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "neo4jrb" group.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
Chris
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "neo4jrb" group.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "neo4jrb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4jrb+u...@googlegroups.com.
To post to this group, send email to neo...@googlegroups.com.
Visit this group at http://groups.google.com/group/neo4jrb.
For more options, visit https://groups.google.com/d/optout.