On twitter

@swpave 我一開始也是阿~ 不過看了快一年了, 發現每個人都好有自己的特色! XDD

follow me on twitter

The ORM find_by_* method is gone. (Kohana 2.2) 2

According to this post in the kohana forum, the find_by_* method of ORM is not avaliable since Kohana 2.2 because the performance issue.

In the previous version, Kohana 2.1.2, I used before. I can use find_by_*() method like this:

$user = new User_Model();
$user->find_by_username('tzangms');

But for now, in Kohana 2.2, we should use where() instead, if we want to find by username, not by id.

$user = new User_Model()
$user->where('username', 'tzangms')->find();

damn, find_by_* is so intuitive.

August 20th, 2008 Programming Tags: , ,

2 Responses to “The ORM find_by_* method is gone. (Kohana 2.2)”

  1. [...] public links >> kohana The ORM find_by_* method is gone. (Kohana 2.2) Saved by oddacorn on Tue 04-11-2008 daily links Saved by tarjanyil on Mon 20-10-2008 Kohana [...]

  2. [...] the end, it was Google that led me to the answer. So now before I continue I think I better run phpDocumentor or something else through this [...]

Leave a Reply

Partners of Oceanic / 人生海海

jiwo sca wellmeet