Esempio n. 1
0
 /**
  * Create a new Analogue Query Builder instance.
  *
  * @param \Analogue\ORM\Drivers\QueryAdapter  $query
  * @param \Analogue\ORM\System\Mapper $mapper
  * @return void
  */
 public function __construct(Mapper $mapper, DBAdapter $adapter)
 {
     $this->mapper = $mapper;
     $this->adapter = $adapter;
     $this->entityMap = $mapper->getEntityMap();
     // Specify the table to work on
     $this->query = $adapter->getQuery()->from($this->entityMap->getTable());
     $this->with($this->entityMap->getEagerloadedRelationships());
 }
Esempio n. 2
0
 /**
  * Get a the Underlying QueryAdapter.
  *
  * @return \Analogue\ORM\Drivers\QueryAdapter
  */
 protected function newQueryBuilder()
 {
     return $this->adapter->getQuery();
 }