Alright good 🙂
Are we supposed to use this on all projects at the moment?
Yes exactly, that is what I have been doing. But I guess I just wished I could use abstract 🙂 That way nobody could create by accident through the CMS or something either
Is there any way to have a subclass of
DataObject, have some DB fields, and then create subclasses of it? Sometimes I want various classes to have a few of the same DB fields, but the parent class is never used directly
Sorry about that!
Oh no. Looks like I forgot to extend the correct object...
Same error. Also it looks like
$className = DataObject::getSchema()->baseDataClass($item->ClassName); doesnt output the parent DataObject at all, just returns the child class's class name
Will try with simple
SS 4.4. I didnt know using
->first() was recommended over
get_one. And yes
get_one second param accepts string or array.