The static pages display fine, but as soon as I display anything dynamic, I get a CDbException:
CDbCommand failed to execute the SQL statement: SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "assetchanges"
I seems to be either due to case sensitivity or quotes around the table/column aliases.
How can I start to fix these issues? Where do I look?
Why would the alias be "assetchanges" when in the model it's set to "assetChanges", etc?
In this example, I'm trying to display actionHome within the Portfolio controller, which looks like this:
public function actionHome($id)
{
Yii::app()->params['portfolio_id'] = $id;
# Get data for this view
# =======================
$criteria = array(
'assets'=>array('together'=>true),
'assets.assetType'=>array('together'=>true),
'assets.assetChanges'=>array('together'=>true),
);
$portfolio = Portfolio::model()->thisUsers()->with($criteria)->findByPk($id);
$this->render('home', array('portfolio' => $portfolio));
}

Help











