I was going to report a bug, but since I’m new to Yii, I don’t know if this is the desired behavior.
What steps will reproduce the problem?
Following along in Agile Web Application Development book
Create two databases (mine were trackstar_dev and trackstar_test)
Set up one database under db in config/main.php (_dev in my case)
Set up the other database under db in config/test.php
Add one table with same name to both databases. Model generator works in this instance.
Add another table to the test database only. Model generator does not work, fails with “Table ‘tablename’ does not exist”
What is the expected output? What do you see instead?
Expect Gii to generate a model; get “Table ‘tablename’ does not exist” error.
What version of the product are you using? On what operating system?
Yii 1.1.7; Wampserver 2.1 (Apache 2.2.17, PHP 5.3.4, MySQL 5.1.53); Win7 Pro x64; Firefox 4
Please provide any additional information below.
I thought that any time a test database was specified, it would be used instead of the main database? Is this just for PHPUnit testing?