datamapper/dm-is-tree — Issue #7: Constraints?
Author: mltsy
Created: 2012-03-01 17:41:51+00:00
State: open

I was able to add a constraint for nodes with children by repeating the children relationship like this:
```
is :tree
has n, :children, :model => self, :child_key => :parent_id, :constraint => :protect
```
However, it would be much more convenient if one could simply say:
```
is :tree, :constraint => :protect
```