Accessing model outside of module?

AM trying to do the following inside my module but my Model is outside the module am in.


$results = Videos::model()->findAll(array('author_id' => $model->id));

How can I correct this so I can access my model from inside the module?


Yii::app()->getModule('myModule');

No, I think you have misunderstood, I am not trying to access a model inside a module but rather the inverse. I have a model in my main application that I would like to call inside a module. Is there a syntax that tells yii to look for that model outside of the module?

by default, the model-folder of your application is already imported

see the import-array in your config/main.php




'import' => array(

  'application.components.*',

  'application.models.*'

)



Ah shame on me, syntax error was my problem. But thank you for taking time to help me :)