Seems I have a lot to learn about xPDO...
Now I tried
$packageName = 'myPackage';
$prefix = null;
$packagepath = $modx->getOption('core_path') . 'components/' . $packageName . '/';
$modelpath = $packagepath . 'model/';
if (is_dir($modelpath)) {
$modx->addPackage($packageName, $modelpath, $prefix);
};
$myArr = array(11,22,33);
$classname = 'myXpdoClass';
$c = $modx->newQuery($classname);
$c->where(array("id:IN" => $myArr));
$c->prepare();
print $c->toSQL();
and the table name is found - fine so far!
But when I continue with
if ($collection = $modx->getCollection('$classname',$c)){
print('BLISS');
} else {
print('FAIL');
};
I get FAIL.
[ed. note: ottogal last edited this post 9 years, 2 months ago.]