3 ms·
I think if you want the family tree, you can write a self referential(assuming post table is self referential as it should be) recursive query. But in this cas
by irahul 14y ago
I think if you want the family tree, you can write a self referential(assuming post table is self referential as it should be) recursive query.
But in this case, writing a before insert/update trigger which ensure some_post.created_at < parent.created_at before setting parent.parent_id = some_post will do the trick.