Comment 11 for bug 2050227

Revision history for this message
Mike Rylander (mrylander) wrote :

I'm sorry I haven't noticed this work until now, but I want to raise a caution flag before a commit happens and it becomes harder to revise any decisions made in this branch.

Each XML namespace used in the IDL is meant to signal information to different layers of the software (or, different audiences). I'm concerned that we're crossing purposes a little and just want to make sure we consider the background and context of what exists now.

For the issue at hand here, I think there are two namespaces that matter: oils_obj and oils_persist.

oils_persist is meant to describe the database layer, and signal to logic that touches the database directly about things that are relevant to that logic regarding the fields/columns, but that are not easily discoverable through inspection of the DB object structures or DDL, but are necessary for properly constructing queries using those columns/fields.

oils_obj is meant to describe the in-memory objects built from table rows (in most cases), and how both code and users of the code should expect to interact with the fields/properties.

ISTM, if we want to describe the nullability of a column, we should invent a new attribute in the oils_persist namespace. If we're just trying to identify fields that a user must supply a value for, we should (as this branch does) make fuller use of the oils_obj:required attribute. However, I don't think they're the same thing, even if they significantly overlap, because as Galen says in comment #6 above there are cases where "required" isn't necessary or even meaningful.

For a full list of the "defined" attributes, such as they are, you can look at fm_IDL.xsd, which sits right next to fm_IDL.xml.

Thanks, Jason and Galen!