{
    "name": "joinAdd",
    "parent": "",
    "title": "",
    "permname": "",
    "modOrder": "001",
    "items": [
        {
            "name": "joinAdd",
            "purpose": " adds another dataobject to this, building a joined query.",
            "stype": "function",
            "|xns": "Roo.doc",
            "xtype": "Entry",
            "items": [
                {
                    "name": "joinAdd",
                    "is_static": false,
                    "is_constructor": false,
                    "memberof": "PDO_DataObject",
                    "returndesc": "for chaining",
                    "returntype": "PDO_DataObject",
                    "|xns": "Roo.doc",
                    "xtype": "Synopsis",
                    "items": [
                        {
                            "desc": "(optional)    the joining object (no value resets the join) <br\/>\n                                          If you use an array here it should be in the format: <br\/>\n                                          `array('local_column','remotetable:remote_column');` <br\/>\n                                             if remotetable does not have a definition, you should\n                                             use @ to hide the include error message..<br\/>\n                                          `array('local_column',  $dataobject , 'remote_column');` <br\/>\n                                             if array has 3 args, then second is assumed to be the linked dataobject.",
                            "is_optional": false,
                            "name": "$obj",
                            "type": "array",
                            "|xns": "Roo.doc",
                            "xtype": "Param"
                        },
                        {
                            "desc": "(optional) `'LEFT'|'INNER'|'RIGHT'|''`<br\/>\n                                           Inner is default,\n                                           '' indicates just select ... from a,b,c with no join and\n                                          links are added as where items.\n                                          <br\/>\n                                          If second Argument is array, it is assumed to be an associative\n                                          array with arguments matching below = eg.",
                            "is_optional": false,
                            "name": "$joinType",
                            "type": "array",
                            "|xns": "Roo.doc",
                            "xtype": "Param"
                        },
                        {
                            "desc": "(optional ) if you want to select the table as anther name\n                                          useful when you want to select multiple columsn\n                                          from a secondary table.",
                            "is_optional": false,
                            "name": "$joinAs",
                            "type": "string",
                            "|xns": "Roo.doc",
                            "xtype": "Param"
                        },
                        {
                            "desc": "(optional) The column on This objects table to match (needed\n                                          if this table links to the child object in\n                                          multiple places eg.<br\/>\n                                          `user->friend` (is a link to another user) <br\/>\n                                          `user->mother` (is a link to another user..)",
                            "is_optional": false,
                            "name": "$joinCol",
                            "type": "string",
                            "|xns": "Roo.doc",
                            "xtype": "Param"
                        }
                    ]
                },
                {
                    "stype": "desc",
                    "|xns": "Roo.doc",
                    "xtype": "Section",
                    "items": [
                        {
                            "html": " Usage: (requires links.ini to be set up correctly)\n ```\n \/\/ get all the images for product 24\n $i = PDO_DataObject::factory('image');\n $pi = PDO_DAtaObject::factory('product_image');\n $pi->product_id = 24; \/\/ set the product id to 24\n $i->joinAdd($pi); \/\/ add the product_image connectoin\n $i->find();\n while ($i->fetch()) {\n     \/\/ do stuff\n }\n\n \/\/ an example with 2 joins\n \/\/ get all the images linked with products or productgroups\n $i = PDO_DataObject::factory('image');\n $pi = PDO_DAtaObject::factory('product_image');\n $pgi = PDO_DAtaObject::factory('productgroup_image');\n $i->joinAdd($pi);\n $i->joinAdd($pgi);\n $i->find();\n while ($i->fetch()) {\n     \/\/ do stuff\n }\n ```\n\n if the second argement is an associative array, then the keys can be the argument names,\n and you can also use `'useWhereAsOn' => true` to convert the where argments from the object being added \\\n                                          into ON arguments.\n\n\n\n\n                                          'joinType' => 'INNER',\n                                          'joinAs' => '...'\n                                          'joinCol' => ....\n                                          'useWhereAsOn' => false,\n\n\n\n\n",
                            "|xns": "Roo.doc",
                            "xtype": "Para"
                        }
                    ]
                },
                {
                    "stype": "parameter",
                    "|xns": "Roo.doc",
                    "xtype": "Section"
                },
                {
                    "stype": "return",
                    "|xns": "Roo.doc",
                    "xtype": "Section"
                },
                {
                    "stype": "throws",
                    "|xns": "Roo.doc",
                    "xtype": "Section",
                    "items": [
                        {
                            "|xns": "Roo.doc",
                            "xtype": "Para",
                            "html": "PDO_DataObject_Exception       if it can not work out how to join..."
                        }
                    ]
                }
            ]
        }
    ]
}