Open romaninsh opened 7 years ago
// model - purchase invoices $mi = $m->ref('InvPurchaseLines'); $mi->addDocumentFields(); $mi->onlyFields(['dochead_id','date','contractor_from','contact','ref_no','exchanged_total_net','nominal_id','nominal']);
$m = new \smbo\UnionModel($mi->persistence); $m->addNestedModel($mi, [ 'dochead_id' => '[dochead_id]', 'date' => '[date]', 'contact_id' => '[contractor_from]', 'contact' => '[contact]', 'inv_no' => '[ref_no]', 'amount' => '[exchanged_total_net]', 'nominal_id' => '[nominal_id]', 'nominal' => '[nominal]', ]);
echo $m->action('select')->getDebugQuery(true);
Exception is thrown when I try to $m->export(); or any other method which uses model->getIterator()
$m->export();
model->getIterator()
// model - purchase invoices $mi = $m->ref('InvPurchaseLines'); $mi->addDocumentFields(); $mi->onlyFields(['dochead_id','date','contractor_from','contact','ref_no','exchanged_total_net','nominal_id','nominal']);
echo $m->action('select')->getDebugQuery(true);