When baking a model with CakePHP, why does it prompt for hasOne if it asked hasMany and received an answer of yes already? Is it there a situation when both are appropriate? I would expect some of the behaviors to conflict…
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may hypothetically have a “primary” hasMany related model which you want quick access to, something like:
The reason why
bakeasks you twice is probably primarily because nobody bothered to implement a check of whether you already selected ahasManyor not, or because they consciously decided to leave the door open for the above case.