I had another minor issue too.  When changing a table's primary
key, I'd like to just setting this adequately with the $primaryKey
model atribute and the relationships use it.

Personally I hate to have to change $belongsTo relationship to
add the "foreignKey" parameter too.  I'd like if Cake identify the
name used for the other table's primary key and use it as a part
of the convention instead of "_id".

For example, I think it could be better if we can do something like
this

class Country extends AppModel {
   $primaryKey = 'isocode';

// ^--- primary key defined...

class Trip extends AppModel {
   $belongsTo = 'Country';

// ^-- instead of:   $belongsTo = array('Country'=>
array('foreignKey'=> 'country_isocode'))

I know we could use 'country_id' in the database as a foreign
key, but I it not so intuitive.


Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105

http://mfandrade.wordpress.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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