I have two tables 'Listings' and 'User'. In Listings Table i have user_id which belongs to Users table. I want 'email' field value from Users table when I find a Listing.
In Listing Model , I included phalcon belogs to code in initialize() function.
$this->belongsTo('user_id', 'Ezydir\Models\Users', 'id', array( 'alias' => 'User' ));
And In Controller :
$parameters["columns"] = array("id","title","status","managelevelid","paid_status","User.email");
$listings = Listings::find($parameters);
But Its Not Working if I check in View : $listings->User->id;