Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If a DataObject has a many_many to a SiteTree subclass, and that subc…
…lass has no database fields defined, and $this->name is "ID", this function will errantly return "SiteTreeSubClass.ID", which can never exist in a search query, since there is no such table as SiteTreeSubClass. The problem is that DataObject::hasOwnTableDatabaseField() is a little eager when passed an argument of "ID." It doesn't check to see if the object has its own table first.
- Loading branch information