Closed PollyCatZ closed 2 years ago
Hello friend, what if aliases and PhalconAdapter are used?
` $builder = $this->modelsManager->createBuilder()
->from(['o' => Orders::class]) ->columns([ 'o.id as id', 'o.sticker as sticker', 'o.status as status', 'item.id as item_id', 'item.name as item_name', 'c.id as client_id', 'c.phone as client_phone', 'section.title as section_title', 'cat.title as cat_title', 'brand.title as brand_title', ]) ->leftJoin(Items::class, 'item.barcode = o.barcode', 'item') ->leftJoin(Sections::class, 'section.id = item.section_id', 'section') ->leftJoin(Cats::class, 'cat.id = item.cat_id', 'cat') ->leftJoin(Brands::class, 'brand.id = item.brand_id', 'brand') ->leftJoin(Clients::class, 'c.id = o.client_id', 'c') ->getQuery() ->getSql(); $dt = new Datatables(new PhalconAdapter($this->di, 'db')); $dt->query($builder['sql']); $dt->filter('status', function ($status) { $this->log(123); //this code is not executed at all <<<<<<<<<<<<<<<<<<<<<<<<<<< return 'o.status = 1'; }); echo $dt->generate()->toJson();`
That's because $this refers to FilterHelper class. If I have find free time, I will change it to normal behavior.
Hello friend, what if aliases and PhalconAdapter are used?
` $builder = $this->modelsManager->createBuilder()