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.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---