[eluser]DGmike[/eluser]
hi m4rw3r, thanks for the answer, i was using the version 0.2.
But the old version i was using the has_many perfectly, and I had problems just with HABTM, but now, after the download( the version 1.0 ) i can´t use both.
This is a simple relation where one custumer could be many address...
file/model: Cli_model.php
Code:
var $has_many = array(
'name'=>'Ecl_model',
'model'=>'Ecl_model',
'table'=>'PRODWEB.PUBLECL_T',
'fk'=>'IDCLI'
);
file/model: Ecl_model.php
Code:
var $belongs_to = array(
'name' => 'Cli_model',
'model' => 'Cli_model',
'table' => 'PRODWEB.PUBLCLI_T',
'fk' => 'IDCLI',
);
file/controller
Code:
$rec->add('Ecl_model',$r);
I know that this method return false If there are no relation defined,but there are