Hi,
to find solutions for my problems
http://modxcms.com/forums/index.php/topic,61184.0.html and
http://modxcms.com/forums/index.php/topic,61189.0.html
I’d like to see what SQL xPDO sends to the database server. I found the xPDOCriteria.toSQL()method which looks promising for this purpose.
I tried
<?php
$obecjtGraph = '{ "Products":{ "Prices":{} } }';
$criteria = $modx->newQuery('nittelCategory');
$criteria->bindGraph($obecjtGraph);
echo '['.$criteria->toSQL().']';
But this returns only [].
Even after performing the query [] is returned:
<?php
$obecjtGraph = '{ "Products":{ "Prices":{} } }';
$criteria = $modx->newQuery('Category');
$criteria->bindGraph($obecjtGraph);
$categories = $modx->getCollectionGraph('Category', $obecjtGraph, $criteria);
echo '['.$criteria->toSQL().']';
Am I doing something wrong?
Thanks!