-
Notifications
You must be signed in to change notification settings - Fork 38
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
Adding edges to existing nodes #36
Comments
Hi @tradetree, The ability you're asking for is more likely to be found in a OGM (Object Graph Mapping) type of a solution. |
Thanks for the info. We were able to use a query to add an edge between two existing nodes, but the concept of adding or updating relationships like edges this way is kind of confusing. Once objects are committed to a database it should be possible to update them, so I guess I'm just missing something. I searched on OGM via google and read what I could find, but it was only marginally helpful. They compare OGM to ORM, but while I understand ORM this does not quite fit in with that understanding. We are not mapping objects into the graph database, but trying to create objects directly and then update them. Anyway, it appears to make sense to you and there is no other method in redisgraph-go that would be better, so we'll stick to the query method. |
@tradetree have you looked into https://github.com/cr0hn/sqerzo ? |
I will check it out, thanks! But we did get it working with the query method and we have our own mapping now. |
My development team noticed that there is no way in redisgraph-go to add edges to existing nodes without duplicating the nodes in the process. Please see RedisGraph/redisgraph-py#16 as a reference to this issue within Redis graph in general. The solution described here points to using
MATCH (f:%s{%s:'%s'}), (t:%s{%s:'%s'}) CREATE (f)-[:in]->(t)
as the way to avoid duplication of nodes. However, we do not find a way within redisgraph-go to make such a transaction? There is basically no 'update' possible to nodes, only create and delete. We can delete old nodes and create new ones with edges, but this is costly and inefficient. Is there any plan to add an UpdateEdge or something similar as AddEdge duplicates nodes?The text was updated successfully, but these errors were encountered: