Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ID column for Related model doesn't populate on Post #65

Open
EdsonRCJ opened this issue Oct 1, 2020 · 0 comments
Open

ID column for Related model doesn't populate on Post #65

EdsonRCJ opened this issue Oct 1, 2020 · 0 comments

Comments

@EdsonRCJ
Copy link

EdsonRCJ commented Oct 1, 2020

I'm using loadAll() function and works fine, but It doesn't populate the id for the related model

{ "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)

My mapping function on "Escolaridades" model :
`

public static function mapping(){
  return [
       'id' => 'esco_id',
      'descricao' => 'esco_descricao'
   ];

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant