Hello In my experience, cake doesn't care. For 2 years or so I have (in my work) myISAM tables for development, and when my code goes to production, tables are converted to InnoDB and FKs properly created. Never got any problem.
If you ask me, I'd say that FKs are nice because it keeps data integrity no matter which way you update it. But in cake, FKs errors are not properly treated, you get a nice red message or nothing (depends on debug level). Cake data validation's way to go, but then you got two places to update (database and models). It would be nice if bake detects FKs automatically. On Aug 14, 6:09 pm, JamesF <[email protected]> wrote: > no i just want to alter my current mysql database to use innodb > without affecting the model relationships. it is a trivial thing to > change the storage engine but I am not sure of the results. > > On Aug 14, 5:07 pm, anders als <[email protected]> wrote: > > > So, you want Cake to use MyISAM "syntax" for an InnoDB driven sql > > server? > > I think this is possible doing some configurations inside of the > > database related core files > > > On 14 Aug., 22:26, JamesF <[email protected]> wrote: > > > > Whnn I first set up the current app I am using, I chose InnoDB tables > > > for almost any Model that i thought would be related. My thinking was > > > that Cake wouldn't understand the foreign key relationships and it > > > would lead to database integrity problems. > > > > I am assuming that Cake doesn't care which storage engine I use in the > > > case of simple model relationships. I am not using transactions or row > > > level locking currently, and more often then not, the CASCADE effect > > > of InnoDB tables has made some of my data go bye-bye. > > > > I appreciate that InnoDB prevents me from inserting data with > > > incorrect id's and fk id's but it also deletes child data when i don't > > > want it to (unless i use RESTRICT or SET NULL on that fk). > > > > So the crux of my question is this, can I maintain my current app > > > functionality while converting back to MyISAM tables, considering I do > > > not use any advanced InnoDB features? Will Cake still handle my table > > > relationships correctly when I am following proper naming conventions > > > for foreign keys and table names? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
