silverstripe-terraformers/keys-for-cache

Add unit test scenarios to cover Versioned with mode 'versioned'

Closed this issue · 0 comments

TIL that Versioned has two modes:

  • stagedversioned: The one we're all probably used to, where you have _Versions records, as well as a Draft and Live record for your DataObject.
    • Any time you have applied the Versioned::class extension to something, this was/is actually an alias for Versioned::class . '.stagedversioned'.
  • versioned: Which I didn't know about, but is where you have _Versions records, but only ever have a Live record for your DataObject (there is no draft).
    • When you apply the Versioned::class extension to something, you can explicitly state that you want Versioned::class . '.versioned' to get the "non staged" version of Versioned.

Current scenarios only cover stagedversioned.