We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon Framework 0.9.0 released!

We are very pleased to announce the immediate availability of Phalcon Framework 0.9.0 stable!

https://blog.phalcon.io/post/42369409581/phalcon-framework-0-9-0-released



12.1k

Congratulation next milestone, and looking forward for more and more :)

+7!

Russian, по русски обобщил запись из блога и данные из CHANGELOG: Пока разработчики подготавливают релиз обобщу что интересного нас ждёт в Phalcon 0.9.0:



36.0k

+8 Dear Phalcon, I can not find any information about "Support for reusable records". Tell me please, how to work with this feature?

P.S. Earlier I did the same thing by extending \Phalcon\MVC\Model...



7.9k

HI and thank you for your great work. I see that the project maturing very quickly and has full and very well maintained documentation. I wish you success and I am looking forward to use Phalcon Framework in my own projects.



98.9k

@aavolkoff This is a similar feature you posted before on Github, it tries to solve the problem of re-querying related records when a large resultset is traversed:

foreach (Users::find() as $user) {
    $profile = $user->profile; //SELECT * FROM profiles WHERE id = ?
}

Since many users could have the same profile, in most cases, there is no need to re-query it again, so you can mark this relation as 'record reusable':

class Users extends Phalcon\Mvc\Model
{
    public function initialize()
    {
        $this->belongsTo('profiles_id', 'Profiles', 'id', array(
            'reusable' => true
        ));
    }   
}

In this way if an user has a profile that has been queried before the reusable instance is used instead of re-query the record again, depending on the number of records this could increase the performance dramatically.



36.0k

@Phalcon thanks a lot for this feature! It is very flexible way to increase the prfomance af apps!