I'm not sure about the wierd table and id names, but it's perfectly
possible to assign a primary key as a foreign key too, without relying
on Model::query():
table: products [id, ...]
table: product_descriptions [id, ...]
class Product extends AppModel {
var $name = "Product";
var $hasOne = array(
'ProductDescription' => array(
'foreignKey' => 'id'
)
);
}
works fine... for querying anyway - for adding new records it might
require a bit of special treatment.
On Sep 19, 9:02 pm, axpen <[EMAIL PROTECTED]> wrote:
> Ok that works fine, thank you for your effort, i'll just remember in
> the future that advanced model integrations with preexisting tables
> will have to be done manually.
>
> --Alex
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---