daniel added a comment.

To clarify: Conceptually, ChangeOp does not belong to the persistence layer. They are basically plug-ins to an "interactor". The represent a "modification" to the Entity, and their main purpose is to apply that modification to the data model, after validation. Their secondary duty is to provide a human readable description of the modification. They have nothing to do with storage.

If we have an input constraint "a Lexeme's lexical category must be an existing item", then this is exactly the right place to do it: preserving the logical integrity(*) of the data model is indeed the job of ChangeOps.

(*) Note that these constraints are "soft" in the sense that they are checked on input, but may be broken later - e.g. the referenced Item is deleted. This means that we do not have a strong guarantee that this constraint remains true, but we enforce it for input from users and bots.


TASK DETAIL
https://phabricator.wikimedia.org/T154221

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: Aklapper, Jakob_WMDE, WMDE-leszek, daniel, Ladsgroup, Aleksey_WMDE, Cinemantique, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Darkdadaah, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to