give advice me how can I give foreign key relation in php

classic Classic list List threaded Threaded
2 messages Options
tchristopher87 tchristopher87
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

give advice me how can I give foreign key relation in php

This post has NOT been accepted by the mailing list yet.
how can I give foreign key relation?
rnwhite73 rnwhite73
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: give advice me how can I give foreign key relation in php

This post has NOT been accepted by the mailing list yet.
you can give foreignkey relation by defining "foreignKey" key in your belongsTo array of model file. e.g.

var $belongsTo = array(
   'ContentManagementFile' => array(
   'className' => 'ContentManagementFile',
   'foreignKey' => 'content_management_file_id',
   'conditions' => '',
   'fields' => '',
   'order' => ''
   )
 );
Loading...