Difficulty Setting up Treeview Widget with Entity with Self-Reference
Hi, I am trying to set up the tree view widget. I’ve tried multiple configurations of the relationships between my entities, gone over the demo project (in particular the Flower List, Flower Families, and User Organizations), but am still having trouble getting this working. Account * → * Task Categories * → Tasks, with the self reference Tasks * → [SUBTASKS] → * Tasks. I’ve set it up this way to mirror the UserOrganizations setup (Organizations * → * Departments * → * Employees, with the self reference Departments * → [SUBDEPARTMENTS] → * Departments. I should note that there is also a relationship Account * → * Tasks. I’ve thought about trying the setup removing this relationship and using the Task Owner field. Ultimately, the Task entity should have two relationships: Task Owner (Account 1 → * Tasks) and Task Assignees (Account * –> * Tasks). Before I consider using the Task owner field, any suggestions? I have tried two setups: Context = Account (traverse Account → Task Categories; Task Categories → Tasks; and Tasks → Subtasks) and Context = Dummy Context (traverse Dummy Context → Task Category, then Task Category --> Tasks, and Tasks --> Subtasks). In both cases, the tasks aren’t being listed out. I’ve tried playing with the parent/child TreeView settings, but that only results in losing the expansion carrots. I’ve tried all sorts of relationships between Accounts, Tasks, and Categories except I haven’t tried removing the relationship between Accounts and Tasks (as that seems a functionally obvious requirement, though I was wondering if I should consider using the entity owner field). I have also tried using the Category as the Context widget, which displays the tasks, but it displays all tasks at the same level. There’s no task/sub-task grouping. If I only give the top-level task a category, then the subtasks do not show at all within the category. In a nutshell, here’s the requirements I'm playing with: Account 1 → * Task [Task_Owner] Account * ← → * Task [Task_Assignees] Account * ← → Categories [Account_TaskCategories] Task *← → * Categories [Task_Categories] Task * ← → * Task [Subtasks] Ideally these relationships run both ways, ie, Categories refer to Tasks AND Tasks refer to Categories), but I've currently got them set as directional to try and get tree view working. My next step will be to duplicate the widget domain model for Organizations exactly, and see if I can get that working. In the meantime, I was wondering if anybody with more experience sees any obvious snafus. Thanks!