dbObject::with PHP Method

with() private method

Function to set witch hasOne or hasMany objects should be loaded togeather with a main object
private with ( string $objectName ) : dbObject
$objectName string Object Name
return dbObject
    private function with($objectName)
    {
        if (!property_exists($this, 'relations') && !isset($this->relations[$name])) {
            die("No relation with name {$objectName} found");
        }
        $this->_with[$objectName] = $this->relations[$objectName];
        return $this;
    }