-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node Label is recognized as Edge Label #111
Comments
When I run the query that you provided, it is placed correctly under node label. Could you make sure if you've cloned from main branch or share the order of query execution? |
Sure! When I type
Now, how I am executing the query. First, I created the graph: SELECT * FROM ag_catalog.create_graph('goodreads_db'); Then I created a "User" vertex: SELECT * FROM cypher ('goodreads_db', $$
CREATE (a :User {first_name: 'Matheus', last_name: 'Matsumoto', country: 'Brazil', read: 9, reading:2 }) RETURN a
$$) as (a agtype); I also created a "Book" vertex: SELECT * FROM cypher ('goodreads_db', $$
CREATE (a :Book {title: 'To Kill a Mockingbird', author: 'Harper Lee', rating: 4.27, pages: 336, language: 'English', ratings: 5574002, reviews: 107847})
RETURN a
$$) as (a agtype); And after this, I created an edge between "User" and "Book" with a "READ" label: SELECT * FROM cypher ('goodreads_db', $$
MATCH (a :User), (b :Book)
WHERE a.first_name = 'Matheus' AND b.title = 'To Kill a Mockingbird'
CREATE (a)-[e:READ {rating: 4}]->(b)
RETURN e
$$) as (e agtype); So I kept doing it like this, also adding the vertices with "Author" label and adding the edge with "AUTHOR_OF" label between them. Now I have about 17 nodes and 22 edges. I went to where I installed AGE Viewer and executed the |
I did the addition of vertices and edges with the terminal app. Then, just to visualize the graph, I went to AGE Viewer. I believe that some nodes may have been added whilst AGE Viewer was running, but I added them via terminal. I do not know if this affects this behavior or not. So, I open the Terminal App, go to the postgres directory, and then I type:
And then I start using AGE to create the graph, nodes, and edges. |
Oh and I forgot to add that I'm using:
|
@MatheusFarias03 This might be specific to postgres version 11 as there's two separate queries for metadata. The query that is executed depends on the connected pg version. Do you experience the same issue when using postgres version 12? |
I did not try it with postgres version 12. |
If possible, could you run this query in your terminal and share the output result?
Thank you |
Running the query it outputs this:
|
The result looks correct to me and now I have about 80nodes and 100 more edges, but I still get the correct result. I've tested with both pg version 11 and 12 on window and ubuntu environment and worked fine. I think there might be some other factor that trigger vertices turning into edges but it's difficult for me to find out the bug at this moment. I'd suggest you to do the following.
Thank you for reporting this bug and I'm sorry I couldn't be more helpful. |
No worries! I'll try it again with postgres version 12 and write here if I stumble on any bugs. |
Bug Description
I've created a graph to replicate the Goodreads website, where you can keep track of your current readings and give ratings to books. The graph's name is "goodreads_db" and the vertices can be of the following labels: "Book", "Author", and "User". When I open AGE Viewer, only "*" and "User" are available on the "Node Label" panel, both "Book" and "Author" appear on the "Edge Label" panel (which are wrongly put since both of them belong to "Node Label").
Furthermore, when I click on the "Book(11)" or "Author(5)" button, it creates a query but it places the "Book" label as an edge label:
Here is an example of how I'm adding these "Book" vertices:
Expected behavior
The "Book" and "Author" label should be placed under "Node Label", so that when I click it, it would create a query like this:
When I type this query manually, the right behavior is shown:
The text was updated successfully, but these errors were encountered: