Skip to content

Two different arrays for relational models #16

@rupalgohel

Description

@rupalgohel

I am getting two different arrays for relational model.
Like Model - 1:
[_readProperties:yidas\Model:private] => Array
(
[id] => 1
[value] => 545488
[data] => 1
)
with this $vendors = $model->vendors; I am getting another data.
Here model 1 hasOne relation with vendor table.
My requirement and yii2 also gives relational query data in single array
(
[id] => 1
[value] => 545488
[data] => 1
[verndor] => ()
)
and how to get array of query $model = $this->Vendor_model->findAll();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions