Aliases and subquery

How can I add virtual column by using models query object.This one doesn`t work

$user = User::query() ->columns(array( '', '(SELECT COUNT() FROM user) AS UserCnt' )) ->execute();



83.4k

Subqueries aren't supported by Phalcon, they're expected to be implemented soon.