Re: Helo. Please help me

2012-11-15 Thread Greg Skerman
1. The model is defined as id by CONVENTION only. If you want to use something else, public $primaryKey = 'my_fields';, refer to the documentation: http://book.cakephp.org/2.0/en/models/model-attributes.html#primarykey 2. associations handle joins automatically - so when you get the value of one mo

Re: Helo. Please help me

2012-11-15 Thread Renato de Freitas Freire
It's really hard to understand your questions. But cakephp is extremely flexible. cake has some standards, but you can change it, if you want. If you want to use other field as primary key, instead of ID, just set it on your model file (var $primaryKey = 'your_field'). If you have some relations

Helo. Please help me

2012-11-15 Thread Andre Sutarko
Hello, Cakephp team. I'm new member of your Cakephp Groups. I have trouble of using cakephp framework. I'm using Cakephp 2.2.3. I have some question about this cakephp as 1. Why cakephp model always use id of table as primary key? Why don't cakephp model use others as primary key? 2.