Comment 2 for bug 561521

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I have this feeling, though it's very much citation needed, that schema set methods shouldn't depend on the value of other schema items for validation, to avoid exactly this issue and that kind of constraint should be expressed as an invariant. But I could be wrong.

In any case, you've identified a clear bug and a sensible fix.

I will say that the comment is wrong: getFieldsInOrder returns the fields in the order they're defined in the schema, not ordered by name. This is good, it's far more sensible than ordering by name, but I guess the comment should be fixed.