示例#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());
 }