silverstripe-framework/tests/php/ORM/DataQueryTest/DBFieldAddsToQuery.php
2023-09-05 15:06:53 +12:00

17 lines
355 B
PHP

<?php
namespace SilverStripe\ORM\Tests\DataQueryTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\FieldType\DBText;
class DBFieldAddsToQuery extends DBText implements TestOnly
{
public function addToQuery(&$query)
{
$select = $query->getSelect();
unset($select[$this->name]);
$query->setSelect($select);
}
}