While trying to sort product collection by custom attribute, I am facing weird issue. That is, some products are repeated in back pages.
If I print collection query like
$_productCollection->getSelect()->__toString();
and run it directly on mysql, then no product gets repeated.
Debugging indicates - either my custom attribute sorting has problem - because sorting products by name seems fine on listing page.
or magento collection is prematurely executed/modified.
Appreciate your help.