0

I try to create instance of certain model in console command, but first I getting errors about that Yii could not find model class, then I do this

Yii::import('application.models.*');

, and now I get new this error

'The table "{{user}}" for active record class "User" cannot be found in the database.'

In database table called tbl_user. I try to search on another related topics but I didnt find the solution for this problem. Here is link to my model class .

Here is the link to my config file I think, the problem not in config file because migrations command works properly.

2
  • have you created a separate config file like main.php for console command? Commented Jan 13, 2015 at 13:28
  • @ThinkDifferent, I update post, look. Commented Jan 13, 2015 at 13:31

1 Answer 1

1

Add in your db config (console file)

"tablePrefix"=>"tbl_"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.