Hi Dear Silverstripe,
I'm dealing around with some thinking about
how to best implement my classes in Silverstripe.
There i'm missing some understanding in how saphire does changes on class-inheritance.
As far as i can see, it seems to be a good Idea to derive from Page
if i want to have things shown on a own html page
and to derive from DataObject if i only want to persist things
and show them fe. only within list of other things.
But I've got a few classes, where i'm definitely not sure, whether it's best to derive from Page or from DataObject.
I thought to first start with a 'DataObject' derivation.
fe:
MyClass extends DataObject
...
So my question is: what happens if i later decide to Change to Derive from Page
fe:
MyClass extends Page
..
Are all till now created Instances lost for 'MyClass'?
Will the be reused, and 'extended' by the additional data?
But if, they're missing the 'parent' Page, so how could i find them?
And same way back around. Can i change from a Page Class back to DataObject derived, so that all additional columns are thrown away?