public function oneToMany($model, $relatedKey = null, $thisKey = null)
	{
		// Default the keys if not set
		$thisKey    = $thisKey    ?: $this->getPrimaryKey();
		$relatedKey = $relatedKey ?: strtolower($this->getModelName()) . '_id';

		return new OneToMany($this, $this->resolve($model), $thisKey, $relatedKey);
	}
public function oneToMany($model, $relatedKey = null, $thisKey = null)
	{
		// Default the keys if not set
		$thisKey    = $thisKey    ?: $this->getPrimaryKey();
		$relatedKey = $relatedKey ?: strtolower($this->getModelName()) . '_id';

		return new OneToMany($this, $this->resolve($model), $thisKey, $relatedKey);
	}
public function oneToMany ( $ model , $ relatedKey = null , $ thisKey = null ) { // Default the keys if not set $ thisKey = $ thisKey ? : $ this -> getPrimaryKey ( ) ; $ relatedKey = $ relatedKey ? : strtolower ( $ this -> getModelName ( ) ) . '_id' ; return new OneToMany ( $ this , $ this -> resolve ( $ model ) , $ thisKey , $ relatedKey ) ; }
Retrieves a one to many model relationship

@param   string       $model       The name of the model to relate to the current one
@param   string|null  $foreignKey  The foreign key used to associate the many back to the model
@param   string|null  $thisKey     The local key used to associate the many back to the model
@return  \Hubzero\Database\Relationship\OneToMany
@since   2.0.0
Retrieves a one to many model relationship