Yii Framework Forum: Problems with beforeFind after upgrading - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problems with beforeFind after upgrading Rate Topic: -----

#1 User is offline   Thomas Jensen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 01-August 09

Posted 01 May 2010 - 08:14 PM

After upgrading from 1.0 til 1.1, a beforeFind is being ignored.

In some child class:
public function beforeFind() {
	$this->getDbCriteria()->mergeWith(array(
		'order' => '`id` = 10, `caption`',
	));
	parent::beforeFind();
}


A parent class:
public function beforeFind() {
	$this->getDbCriteria()->mergeWith(array(
		'condition' => '`t`.`type` = "' . $this->getType() . '"',
	));
	parent::beforeFind();
}


Both conditions is ignored.

Thanks in advance!
0

#2 User is offline   Thomas Jensen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 01-August 09

Posted 03 May 2010 - 12:57 PM

Someone? :)
0

#3 User is online   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 03 May 2010 - 02:39 PM

View PostThomas Jensen, on 03 May 2010 - 12:57 PM, said:

Someone? :)


Are those functions event callbacks (public) or did you forget to declare them as protected?

Edit:
This thread is probably relevant in the first case.


/Tommy

This post has been edited by tri: 04 May 2010 - 04:58 AM

Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users