Phactory\Sql\Phactory::createWithAssociations PHP Method

createWithAssociations() public method

The row is saved to the database, and returned as a Row.
public createWithAssociations ( $blueprint_name, $associations = [], $overrides = [] )
$blueprint_name name of the blueprint to use
$associations [table name] => [Row]
$overrides key => value pairs of column => value
    public function createWithAssociations($blueprint_name, $associations = array(), $overrides = array())
    {
        if (!($blueprint = $this->_blueprints[$blueprint_name])) {
            throw new \Exception("No blueprint defined for '{$blueprint_name}'");
        }
        return $blueprint->create($overrides, $associations);
    }