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
Assign single UID to predicate #1519
Comments
Once we support transactions, this is something that users can handle at their end. Related issue: #1445 |
Think I was too quick to declare that txns would solve this. It would still require two round trips to first delete the edges, and then set one. So, the idea of having a If it's not too complex to implement, we'll do so (in v0.9 series). |
Great news! This will be really helpful, as there are a lot of instances where I want to reference a single node in a one-to-many relationship. |
Just thinking about this a bit more. This feature would also enable efficient lookup of a You could then add a new index / filter for that as well. |
Is this still on the cards? |
This looks like a duplicate of #2511. |
We're working on #2511 . |
As posted on the community forum:
It would be useful to be able to assign a
uid
to a predicate directly without adding it to a Posting List. For example, I might have a predicateteacher
, where it is only ever possible to have oneteacher
at a time.At the moment I would have to do the following to update the predicate, which means 2 round trips and is unnecessarily verbose.
Ideally, you would want to be able to specify in the schema that that predicate only accepts a single uid.
It would also have the added benefit of being able to return an object instead of an array when the unary predicate is being queried, as it would know there could only ever be one node/object.
The text was updated successfully, but these errors were encountered: