Get parent_id value #108

cocozz opened this Issue Oct 25, 2012 · 1 comment


None yet

2 participants


Hi !

I need to use the parent_id column to work with jqxTree from jqWidgets (js library for ui).
Using ancestry, when I try to get the value of that column through ActiveRecord it returns null.

Let's say:"id, parent_id")

parent_id will be null for all results

How could I manage to do it ?


parent_id is not a database column (or at least it shouldn't be). In ancestry parent_id is a method, so you cannot do a select on the column.

The values are stored in the 'ancestry' column.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment