Ticket #1165 (closed unconfirmed defect: worksforme)
get_entities_from_relationships doesn't work with 'group' subtype.
| Reported by: | jirwin | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Core | Version: | 1.5 |
| Severity: | major | Keywords: | |
| Cc: | marcus, brettp, dave |
Description
I've extended ElggGroup? to make my own group class, along with subtyping the group entity. Since we don't want groups and our new subtype to always be listed together, we have used the 'group' subtype to be sure to only get non-subtyped group entities when specifically looking at groups.
This works perfectly when using:
list_entities('group',"group", 0, $limit, false);
or:
list_entities_from_metadata('tags',$tag,'group',"group","", $limit, false);
but fails when we try to do:
get_entities_from_relationship('member', $owner, false, "group", "group", 0, "", $number, 0, false, 0);
Failure is indicated by Elgg retrieving all group entities, as opposed to the expected behavior of only group entities with no subtype.
After further examination, get_entities_from_relationship() from relationships.php returns 0 for the subtype when you specify 'group' as the subtype, which is what I would expect it to return. Perhaps a problem with the query generation?
