Skip to content

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

@EdsonRCJ

Description

@EdsonRCJ

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'
   ];

}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions