Qui si legge, tra le altre cose:
Quote
- Criteria modification in CActiveRecord::beforeFind() did not apply to the query when model was loaded in a relational context.
Since version 1.1.13 changes to query criteria made in beforeFind() now also apply to the query when model is loaded in a relational context.
The main problem here is that you can not use the `t`-alias for your table anymore, you have to change your code to
use the table alias currently in use as this is different in relational context.
You can get that alias by calling `$this->getTableAlias();` in your active record class
or `$this->owner->getTableAlias()` in behavior context.
Example:
$criteria->condition = 't.myfield = 1';
You need to change that to:
$alias = $this->owner->getTableAlias();
$criteria->condition = $alias.'.myfield = 1';
Mi potete chiarire quanto grave è questa cosa ? Ovviamente ho parecchie query in giro per il codice che usano 't.' come alias.
Ma non ho NESSUNA implementazione della beforeFind.
Devo preoccuparmi? Perchè attualmente l'intera applicazione funziona a meraviglia e quindi credo di NON averne capito il contesto ...

Help













