Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Load relations with Json Data #65

Open
EdsonRCJ opened this issue Sep 30, 2020 · 0 comments
Open

Load relations with Json Data #65

EdsonRCJ opened this issue Sep 30, 2020 · 0 comments
Assignees

Comments

@EdsonRCJ
Copy link

This JSON can't be loaded on $model->load(Yii::$app->request->post())... Just with : $model->attributes, but this doesn't load the relations
{ "id":"6", "idEscolaridade":"16", "descricao":"teste", "salario":5500.00, "Escolaridades":{ "id":"16", "descricao":"testando" } }

I'm using 'jaacoder/yii2-activated' to mapping the attributes, works for the parent model, but doesn't work for related models (ID column only)

@nstCactus nstCactus self-assigned this Mar 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants