Google Groups

Re: [silverstripe-dev] Re: Making better use of namespaces

Sam Minnée Mar 26, 2012 6:29 PM
Posted in group: SilverStripe Core Development

On 27/03/2012, at 2:17 PM, Simon J Welsh <> wrote:

> I do believe that using fully qualified names for tables gets unwieldily (see for a small example), though I don't know how to get around that especially when class names collide. We can't even use only part of the fully qualified name, as there can still be collisions (i.e. rentbox\BodyCorp\Photo and rentbox\inspection\Photo will collide if we choose class name and project name). Whatever we go with, there will also need to be something similar to the class_alias() calls so that current queries with qualified column names still work.

I was thinking that DataObject could have a table_name option, that defaults to the unqualified name, and could be either set in the class definition or overridden in project-wide config if necessary (eg if you pulled two modules with conflicting table names into a project)