In Magento, on a script I would like to filter the products who don't have any parent product. Currently I do something like :
$products = $this->_productModel->getCollection()
->addAttributeToSelect('*')
->addStoreFilter($this->_storeId)
->addAttributeToFilter('type_id',array('in'=>$_types))
->addAttributeToFilter('status',array('in'=>$_status))
->joinTable('cataloginventory/stock_item', 'product_id=entity_id', array('qty'=>'qty','is_in_stock' => 'is_in_stock'), $this->_getStockSQL(), 'inner');
I got all the products, but can I say "give me only the products without parents" using getCollection() ?
Thanks