Closed cmc333333 closed 8 years ago
I'm guessing this isn't an issue, but could preamble labels ever conflict with regulation versions, so that the delete in bulk_put
would unintentionally delete unrelated layer records?
This is handled okay on the insertion side (in practice, the namespaces are different), but you bring up a great point about the "startswith" deletion. Preambles could delete reg data (if both share the same document number). It'd make more sense to namespace everything (e.g. "cfr:version:label" for regs and "preamble:label" for preambles).
This isn't an issue we'll encounter for a bit, however (we won't have a document number until at least next sprint). I think we're okay to make an issue but get this PR in now.
Layers currently have distinct fields for the label of the regulation component they are referencing as well as the version of that regulation. As we'd like to start creating layers for other entities (namely, preambles), this generalizes that conception to a single "reference" string which includes both version and label when referring to regulations.
Read and write interfaces for the layer model also needed to be updated. See individual changesets for a more in-depth story. Note that there's nothing here to prevent a namespace collision; we're keeping relatively closely with the key-value storage approach.
Should resolve eregs/notice-and-comment#17