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
Query two relationships at a time in elgg_get_entity_from_relationships (Trac #2850) #2850
Comments
Milestone changed to |
Milestone changed to |
Milestone changed to |
cash wrote on 41418388-09-02
Examples: One hop: * isFriendOf use[svn:1] AND * memberOf group1 Two hop: * isFriendOf ? AND ? memberOf group1 Right now we allow people to query based on multiple metadata (and it is possible for people to create really slow queries). It seems reasonable to provide similar support for relationships. We have only had a single case that I can recall where we needed this and we did it through a custom where clause. |
trac user dannyl wrote on 41418835-04-17 I agree. The one case we had - we also handled with custom where clause I think we can close the ticket |
Milestone changed to |
I can envision some more handy use-cases (e.g. sharing with extended friends/friends-of-friends), but even that could be handled by computing the result and storing it explicitly in the DB so the query is only a one-hop. And at the end of the day, I imagine if someone did need something this advanced and wanted to do so in a performant way, we're probably talking about using a real graph DB like Neo4J, rather than Elgg's relational structure. |
Original ticket http://trac.elgg.org/ticket/2850 on 41094667-04-17 by trac user dannyl, assigned to unknown.
Elgg version: 1.7
Right now elgg_get_entity_from_relationships can only handle querying based on one relationship at a time. It seems like it would make sense to be able to query based on two - for example: get all members of a group who are also a logged in user's friends.
D
The text was updated successfully, but these errors were encountered: