1

I'm planning on creating a model that joins some tables to be used in a CGridView. Will the CRUD generated by gii work on this? Specifically the ability to Create/Update.

I've already tried generating CRUD on a MYSQL view - which did not work right for Create/Update.

Thanks!

davepmiller
  • 2,620
  • 3
  • 33
  • 61

1 Answers1

1

It is my understanding that MySql's ISAM does not support relations. However, if you create your tables with the INNODB engine, you can define foreign keys.

It is also supported by SQLite, however. The Yii blogs tutorial shows an example of defining relations at the database level.

In that case, Gii dutifully creates Models with the relations predefined (or better: taken from the database).

Community
  • 1
  • 1
Ivo Renkema
  • 2,188
  • 1
  • 29
  • 40
  • Thanks for your answer. I am just going to have to play around with it a bit to find out. Just installed giix as well in hopes of having a bit more functionality. – davepmiller May 23 '13 at 15:33