Learn CakePHP by Rādhārādhya Dāsa

Learn CakePHP by Rādhārādhya Dāsa
Author: Rādhārādhya Dāsa
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA

HasMany Associations


In our blog database categories, hasMany posts means that a category can have many posts.

BelongsTo Associations


This is the other end of a hasOne or hasMany association. So, in the previous examples, a profile belongsTo a user and a post belongsTo a category.

BelongsToMany associations


In our blog database, there is a belongsToMany association between posts and tags, meaning that a post can have many tags and a tag can be assigned to many posts.

CakePHP Controllers