$selectFoo = Mage::getResourceModel('model/foo')->getSelect();
$selectBar= Mage::getResourceModel('model/bar')->getSelect();
$mergedFooBar = $selectFoo->union(array($selectBar));
Quick and dirty but anyway possibly someone can suggest any alternative solution?

Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
ReplyDeleteVee Eee Technologies
Why don't you load the collections and yank out the items from one, and stick it in the other using removeItemByKey() addItem()?
ReplyDeleteThis makes the assumption that your keys do not overlap.
The only thing I do not like about the SQL method is that the fields (getData stuff) have to be the same for each collection.
- Bryan
well, you are right
DeleteSQL requires to have exactly the same fields structure of collections but it works faster than removeItemByKey() addItem() method performed for each element.
Anyway thanks for pointing out this method as it can be reasonable on small collections with different structure.
SO GOOD JOB ..........................
ReplyDeleteThank you.................
Goods Lift
Hoist Lift