Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save tiller1010/37638e7cafba191773b1911251124bac to your computer and use it in GitHub Desktop.

Select an option

Save tiller1010/37638e7cafba191773b1911251124bac to your computer and use it in GitHub Desktop.
Override the db, has_one, etc... properties with yml

This PR originally had info about this, but it was requested out. silverstripe/developer-docs#345

DataObject subclasses' db, has_one, has_many, etc... properties cannot be overridden in DataExtensions.

Instead, you need to use yml to override these.

---
Name: override-db-properties
---
Vendor\Package\DataObjectSubclass:
  db:
    SomeProperty: "Enum('original_value1,original_value2,new_value_added_here','original_value1')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment