Sunday, February 23, 2014

Re: Any problems if foreign key is defined in the table creation SQL script?

I always view them separately. The model associations tell Cake how different tables are related but doesn’t enforce it. The SQL absolutely defines the relationships and enforces the integrity.  I wouldn’t omit the integrity as that is the golden source.


Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 23 Feb 2014, at 12:30, Sam <lightaiyee@gmail.com> wrote:

In cakephp, the table relationship is defined in the Models and no foreign key needs to be defined in the table creation SQL script. However, I have a SQL script created using MySQL workbench that defines the foreign key. Will this be a problem in cakephp?

--
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 unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: