waldo2188 / DatatableBundle

Symfony2 Ajax Datatable Bundle to simplify the use of http://datatables.net/ (and Doctrine entity inside)
MIT License
17 stars 16 forks source link

Embeddable field problem #32

Open ahurt2000 opened 5 years ago

ahurt2000 commented 5 years ago

Hello, When using embeddables the getData fucntion at Waldo\DatatableBundle\Util\Factory\Query\DoctrineBuilder doesn't work.

We think that this could be solved:

Embeddables: Fields thats comes like alias.address.zipcode then the 331 line not work.

We suggest replace the line 331 inside the get_scalar_key function:

$_f = str_replace('.', '_', $_f);

by:

$pos = strpos($_f,'.');
if ($pos !== false) {
    $_f = substr_replace($_f,'_',$pos,strlen('.'));
}

What's do you oppinnion about it?

Thanks