I am studying model relationship types in cakephp.
I built two tables and in one of the tables A,
I got these fields:
Table A {postID, topic, content}
Table B {replyID, content, postID}
And when I ran the webpage, there was an error related to SQL
saying that cakephp could not find post_id.
It is strange that I already declared
$ primaryKey for using postID in the A.php table in the Models folder,
but cakephp seemed to want me to change the ID field to post_id instead of postID because the error went away after I changed primaryKey to post_id .
ANY ideas?
source
share