DatatableBundle icon indicating copy to clipboard operation
DatatableBundle copied to clipboard

How to access a method of the repository?

Open cristianargotty-zz opened this issue 8 years ago • 0 comments

Example I need get record for

$res=$qb->getQuery()->getResult();
$email=$res[0]->getOrderCustomer()->getEmail();

but I do not know how to access the method from: setFields() if I try this I get this error

Notice: Undefined index: o_getOrderCustomer_getEmail

`$datatable = $this->get('datatable') ->setFields( array(

                "Id" => 'o.id',
                "Email" => 'o.getOrderCustomer.getId()',// error
                "_identifier_" => 'n.id')
        )->setGlobalSearch(true);`

Help Please

cristianargotty-zz avatar Sep 23 '17 16:09 cristianargotty-zz