I think you need to name the two Lanca models differently like

http://bin.cakephp.org/view/501804416

see if that helps

On 5/31/07, franciscodg <[EMAIL PROTECTED]> wrote:
>
>
> hi, my problem is:
>
> I have in sql:
> --
> -- Estructura de tabla para la tabla `historialcuotas`
> --
>
> CREATE TABLE `historialcuotas` (
>   `id` int(11) NOT NULL auto_increment,
>   `lancha_id_resta` int(11) NOT NULL,  (foreign key table lanchas)
>   `lancha_id_suma` int(11) NOT NULL,  (foreign key table lanchas)
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=89 ;
>
>
> --
> -- Estructura de tabla para la tabla `lanchas`
> --
>
> CREATE TABLE `lanchas` (
>   `id` int(11) NOT NULL auto_increment,
>   `nombre` varchar(100) NOT NULL,
>   `observaciones` text,
>   `cliente_id` int(11) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=100 ;
>
>
> in the models: historialcuota..
>
> class HistorialCuota extends AppModel {
>
>     var $name = 'Historialcuota';
>         var $belongsTo = array('Lancha' =>
>                            array('className'  => 'Lancha',
>                                  'conditions' => '',
>                                  'order'      => '',
>                                  'foreignKey' => 'lancha_id_resta'
>
>                            ),
>                          'Lancha' =>
>                            array('className'  => 'Lancha',
>                                  'conditions' => '',
>                                  'order'      => '',
>                                  'foreignKey' => 'lancha_id_suma'
>
>                            ),
>     );
>
>
> --- the problem is that single it shows one a key ('foreignKey' =>
> 'lancha_id_suma') and the other
> ('lancha_id_resta') not appear.  as I can do it ???
>
> sorry by my english :P
>
> greeting.
>
>
> >
>


-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to