Thanks Larry, that's excellent! I knew there had to be a better way.

After seeing this, I realize that you do formally define foreign keys
in the database. For clarification, what harm is there if you don't
actually define FK's in the database? It appears that CakePHP doesn't
actually need them to be defined in the DB, it figures it out just by
convention or any convention overrides declared in the Model
definition.

Is this just bad DB design to not define the FK's in the tables? Will
it have negative affects on the MySQL DB performance? I suppose if you
were to take the DB outside the context of the CakePHP application (or
even if you did any manual SQL statements), not having FK constraints
in the table could results in orphaned records if you were deleting
records. I guess I kinda answered that question for myself, but I'd
still like to know if CakePHP relies on FK definitions in any way
instead of just inferring them.

Thanks again! I'll now try using DBDesigner in the CakePHP fashion and
take advantage of Larry's script.  Good stuff.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to