Re: Cake associations question (foreign keys)

2006-10-24 Thread Gil Vidals
Unfortunately, cakephp doesn't support compound primary keys. You will need to declare a primary key in cake in order for the save and insert to work properly. A work around is to add an auto_increment field to every table, which implies that the compound key must be removed since Mysql only allow

RE: Cake associations question (foreign keys)

2006-10-24 Thread Erich C. Beyrent
> Defining your schema and having the database engine enforce key > integrity has its advantages and disadvantages. You'll probably want > to continue to learn about the issues regarding telling mySQL about > foreign keys. What about us poor schmucks who are trying to develop applications u

Re: Cake associations question (foreign keys)

2006-10-23 Thread nate
Nevermind the fact that compound primary keys are a Dumb Idea(tm). --~--~-~--~~~---~--~~ 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

RE: Cake associations question (foreign keys)

2006-10-23 Thread Christian Winther
Hey If you want to use constraints / foreingkeys ( FK ) under the MySQL database server, you need to use the table type innodb instead of MyISAM ( default for mysql ) http://dev.mysql.com/doc/refman/4.1/en/innodb-overview.html ( == 5.1 ) http://dev.mysql.com/doc/refman/5.0/en/innodb-overview.htm

Re: Cake associations question (foreign keys)

2006-10-23 Thread John David Anderson (_psychic_)
On Oct 23, 2006, at 4:03 PM, Robert wrote: > > Cheers John for the quick reply. > > Haven't run into problems, it was just that from my Databases > lecture I > vaguely remember something about foreign keys;) and the manual didn't > mention it all, was just checking if it was something the auth

Re: Cake associations question (foreign keys)

2006-10-23 Thread Robert
Cheers John for the quick reply. Haven't run into problems, it was just that from my Databases lecture I vaguely remember something about foreign keys;) and the manual didn't mention it all, was just checking if it was something the author 'assumed' the reader had already done. Any advise of in

Re: Cake associations question (foreign keys)

2006-10-23 Thread John David Anderson (_psychic_)
On Oct 23, 2006, at 3:35 PM, Robert wrote: > > Hey guys, > > ok, been doing a lot of reading the last few days and I think I am > nearly ready to start creating some more complex models and > associations. But I have a question about Foregin keys. > > In the manual (http://manual.cakephp.org/cha

Cake associations question (foreign keys)

2006-10-23 Thread Robert
Hey guys, ok, been doing a lot of reading the last few days and I think I am nearly ready to start creating some more complex models and associations. But I have a question about Foregin keys. In the manual (http://manual.cakephp.org/chapter/models -section 4) it shows how to make associations i