예제 #1
2
 /**
  * Create a new has many relationship instance.
  *
  * @param  \Sgpatil\Orientdb\Eloquent\Builder  $query
  * @param  \Sgpatil\Orientdb\Eloquent\Model  $parent
  * @param  string  $type
  * @return void
  */
 public function __construct(Builder $query, Model $parent, $foreignKey, $localKey)
 {
     $this->localKey = $localKey;
     $this->foreignKey = $foreignKey;
     $this->query = $query;
     $this->parent = $parent;
     $this->related = $query->getModel();
     parent::__construct($query, $parent, $foreignKey->getTable(), $localKey);
 }
예제 #2
0
 /**
  * Get the current connection name.
  *
  * @return string
  */
 public function getConnectionName()
 {
     return $this->query->getModel()->getConnectionName();
 }