Hi,
I have just made a new svn checkout and is trying to follow the guide on how to create a Yii application:
Setup: Win Vista 64bit, xampp v1.6.7
virtual host name: http://yiitest
webroot: c:/www/yiitest/public/
framework installed at c:/www/yiitest/framework/
I have created the application using the yiic tool
I have created a sqlite 3 db using Sqlit Administrator (http://sqliteadmin.orbmu2k.de/)
Added the User table
modified the /protected/config/main.php like this:
// This is the main Web application configuration. Any writable
// application properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
'defaultController'=>'site',
// autoloading model classes
'import'=>array(
'application.models.*',
),
// application components
'components'=>array(
'user' =>array(
'class'=>'application.components.WebUser',
'allowAutoLogin'=>true,
'loginUrl'=>array('user/login'),
),
'db'=>array(
'class'=>'CDbConnection',
'connectionString'=>'sqlite:c:/www/yiitest/public/protected/data/yiitest.db'
),
),
);
When I issue the 'model User' command I get this warning:
Warning: you do not have a 'db' database connection as required by Active Record
.
the crud User command give this error:
Error: Table "User" does not have a primary key.
I assume that the error is due to the fact that the application can't connect to the Db as there is a primary key on the User table.
Any hint ?
Br
Steen