Account hierarchy recursion limit

20 views
Skip to first unread message

Ryan Hiebert

unread,
Jul 17, 2014, 9:49:31 AM7/17/14
to canvas-l...@googlegroups.com
Is there a maximum depth for account to subaccount relationships? I am trying to build some data filtering based on the account that the administrator comes from, but since the relationships are recursive, I'm trying to find an effective strategy to make it both useful and performant. To that end, I'm wondering what Canvas does, since it would have the same issues.

Ryan H

Cody Cutrer

unread,
Jul 17, 2014, 11:13:59 AM7/17/14
to canvas-l...@googlegroups.com
Ryan,

No, there is no limit. It's not a problem for Canvas because we can just query all of the accounts in the database at once (going down), or use a recursive postgres query (going up - see https://github.com/instructure/canvas-lms/blob/stable/app/models/account.rb#L575)

Cody Cutrer
Software Engineer
Instructure


On Thu, Jul 17, 2014 at 7:49 AM, Ryan Hiebert <ry...@ryanhiebert.com> wrote:
Is there a maximum depth for account to subaccount relationships? I am trying to build some data filtering based on the account that the administrator comes from, but since the relationships are recursive, I'm trying to find an effective strategy to make it both useful and performant. To that end, I'm wondering what Canvas does, since it would have the same issues.

Ryan H

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages