View more context

 

phyzical

it uses $tableName = $dataObjectSchema->tableName($dataClass);

phyzical

$dataObjectSchema = DataObject::getSchema();

phyzical

so DataObject::getSchema()->tableName(MYCLASS::class); ?

taoceanz

Nice find @phyzical. Lol, this is from documentation of the tableName function. "Note that this does not confirm a table actually exists (or should exist), but returns the name that would be used if this table did exist."

taoceanz

It definitely returns something, at least.

phyzical

yeah it proably just allows for access to that property, as its used during dev_build

phyzical

if you dont dev build or use it too early it wont exist

taoceanz

I found Config::Inst()->get(MyClass::class, 'property'); would fail if the property didn't exist.

Oh yeah, good point about the dev build. If the table doesn't exist, return what the table should be.