Mass Assignment Isn't working

Hi, trying to migrate from Cake 2 to 3 and I am not getting able to solve some doubts

I receive the data below from my form into my Controller

Array
(
    [Pessoas] => Array
        (
            [ds_nome] => Name Filled in Form
            [ds_imagem] => Array
                (
                    [tmp_name] => 
                    [error] => 4
                    [name] => 
                    [type] => 
                    [size] => 0
                )

            [fl_ativo] => 1
        )

    [Pessoafisicas] => Array
        (
            [nr_cpf] => 000.000.000-00
            [dt_nascimento] => 
            [sexo_id] => 1
            [estadocivil_id] => 
            [escolaridade_id] => 
            [ds_rg] => 
            [ds_orgao_expeditor] => 
            [dt_emissao_rg] => 
        )

    [Usuarios] => Array
        (
            [ds_login] => login
            [ds_senha] => pswd
            [ds_confirma_senha] => pswd
            [fl_ativo] => 1
        )

    [PerfisUsuarios] => Array
        (
            [2] => Array
                (
                    [perfil_id] => 2
                    [fl_ativo] => 1
                    [fl_padrao] => 0
                )

            [1] => Array
                (
                    [perfil_id] => 1
                    [fl_ativo] => 1
                    [fl_padrao] => 0
                )

        )

)

I have the following ModelTables

  • Pessoas
    • hasOne
      • Pessoafisicas
      • Usuarios
    • hasMany
      • PerfisUsuarios
  • Pessoafisicas
    • belongsTo
      • Pessoas
  • Usuarios
    • belongsTo
      • Pessoas
    • hasMany
      • PerfisUsuarios
  • Perfis
    • hasMany
      • PerfisUsuarios
  • PerfisUsuarios
    • belongsTo
      • Usuarios
      • Perfis

And so a try to make the mass assignment of sent data

$pessoasTable = $this->loadModel('Pessoas');
$entityPessoa = $pessoasTable->patchEntities($pessoasTable, $this->request->getData(), [
    'associated' => [
        'Usuarios', 'Pessoafisicas', 'PerfisUsuarios'
    ]
]);

But it parses all the sent data into Pessoa Entity

Array
(
    [0] => App\Model\Entity\Pessoa Object
       (
            [ds_nome] => Name Filled in Form
            [ds_imagem] => 
 ...
    [1] => App\Model\Entity\Pessoa Object
            [nr_cpf] => 000.000.000-00
            [dt_nascimento] => 
 ...
)

Does anybody knows what Am I doing wrong?

Thank’s a lot

I found the problem about this Mass Assignment. The aliases used in Models (Tables) were in singular, while patch were in singular.