Phalcon DevTools 2.0.0
When i generate models by webtools his relations is being duplicate. Also half is being created with "_" and half is being created with CamelCase
phalcon all-models --namespace Netgrid\Models --get-set --relations --force
The 3 first relations is wrong, only the 3 last is right.
public function initialize()
{
$this->hasMany('cod_plano_conta', 'Netgrid\Models\Contas', 'cod_plano_conta', array('alias' => 'Contas'));
$this->hasMany('cod_plano_conta', 'Netgrid\Models\Plano_contas', 'cod_plano_pai', array('alias' => 'Plano_contas'));
$this->belongsTo('cod_plano_pai', 'Netgrid\Models\Plano_contas', 'cod_plano_conta', array('alias' => 'Plano_contas'));
$this->hasMany('cod_plano_conta', 'Netgrid\Models\Contas', 'cod_plano_conta', array('alias' => 'Contas'));
$this->hasMany('cod_plano_conta', 'Netgrid\Models\PlanoContas', 'cod_plano_pai', array('alias' => 'PlanoContas'));
$this->belongsTo('cod_plano_pai', 'Netgrid\Models\PlanoContas', 'cod_plano_conta', array('alias' => 'PlanoContas'));
}
And if i create the model without --relations the 3 first still being created
phalcon all-models --namespace Netgrid\Models --get-set --force
public function initialize()
{
$this->hasMany('cod_plano_conta', 'Netgrid\Models\Contas', 'cod_plano_conta', array('alias' => 'Contas'));
$this->hasMany('cod_plano_conta', 'Netgrid\Models\Plano_contas', 'cod_plano_pai', array('alias' => 'Plano_contas'));
$this->belongsTo('cod_plano_pai', 'Netgrid\Models\Plano_contas', 'cod_plano_conta', array('alias' => 'Plano_contas'));
}