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 relationship, and you don't want to load all data from other tables, you just tell cake to not get those data ($this->Model->recursive = 0).
It's really simple.. just take a look at the book. You will learn all about cake...
Hope this helps you.
--
Renato Freire
Renato Freire
On Thu, Nov 15, 2012 at 10:45 AM, Andre Sutarko <asutarko1979@gmail.com> wrote:
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 asYour cakephp build so well but build model for joining some table mistake and difficult
- Why cakephp model always use id of table as primary key? Why don't cakephp model use others as primary key?
- using method of cakephp model (hasOne, hasMany, Belongto etc) is difficult. itable t won't suitable if we will join some table. if cakephp model can join some table. please you give sample.
- Please cakephp is be build flexible. I will build cakephp model difficult.
Trims
Andre --
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
No comments:
Post a Comment