Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

selecting without onlyFields causes nested model to use (*). #4

Description

@romaninsh

// 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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions