Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update UPGRADE

In beforeFind it has to be getTableAlias() not getTableAlias(false, false) as there might be an alias set by query criteria
  • Loading branch information...
commit f63cb41215daea3a9680cb15c6be53707851870e 1 parent c658823
@cebe cebe authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 UPGRADE
View
7 UPGRADE
@@ -1,4 +1,3 @@
-
Upgrading Instructions for Yii Framework v1.1.13
================================================
@@ -28,13 +27,13 @@ Upgrading from v1.1.12
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 it different in relational context.
- You can get that alias by calling `$this->getTableAlias(false, false);` in your active record class
- or `$this->owner->getTableAlias(false, false)` in behavior 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(false, false);
+ $alias = $this->owner->getTableAlias();
$criteria->condition = $alias.'.myfield = 1';
Upgrading from v1.1.11
Please sign in to comment.
Something went wrong with that request. Please try again.