Example #1
0
 public function testJoin()
 {
     $this->query->join('testJoin');
     static::assertEquals(['testJoin' => []], $this->getProperty('joins', $this->query));
 }
Example #2
0
 /**
  * Query constructor.
  * @param string|null $entity Entity identifier
  * @throws EntityNotFound
  */
 public function __construct($entity = 'material')
 {
     // Old support for not full class names
     if (strpos($entity, '\\') === false) {
         // Add generic namespace
         $entity = '\\samson\\activerecord\\' . $entity;
     }
     $this->order =& $this->sorting;
     $this->group =& $this->grouping;
     // Call parent constructor
     parent::__construct(db());
     $this->entity($entity);
 }