josiahcarlson/rom — pull request #35 by pconerly (2014-07-26 07:35:22+00:00)
Title: added RestrictError, a test for it, and usage in Model.delete() for it.

Hi @josiahcarlson

I wrote my rough-draft idea of what a `Restrict` would look like in `rom`, I'd welcome some code review on this.

Some questions:
* I changed the order of another test so as not to trigger the RestrictError. I didn't totally understand the purpose of the test--- hope it's still okay.
* I am only checking the `OneToMany` fields for references to other models. Since `ManyToOne` maintains the relationship, the opposite condition (Tentacle being deleted before Octopus) is fine.

I also have a couple of inline comments you can see in the code. Thanks!