Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Explain the use of the CakePHP 'hasMany' association.
Answer: 'hasMany' association is used to define a one-to-many relationship between models.

Example:

// class Author extends AppModel {
    public $hasMany = 'Book';
}
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook