Adding ORDER BY FIELD to Propel Criterias
How to extend Propel Criteria with ORDER BY FIELD support for preserving Sphinx result order while retaining compatibility with Propel pagers.
Read the postPosts tagged propel from Setfive.
3 posts
How to extend Propel Criteria with ORDER BY FIELD support for preserving Sphinx result order while retaining compatibility with Propel pagers.
Read the postSo for one reason or another (actually a few bad ones) I ended up having to use a Criteria object looking like this: My issue came when I tried to use it with a sfPropelPager. I set up the pager per usual but for some reason the results that were coming back weren’t correct. For some reason, the COUNT being returned by the sfPropelPager was completely wrong. It turns out the offending lines are here in sfPropelPager.class.php
Read the postHow missing primary keys can make Propel silently fail to delete records, and why adding a simple key resolves unexpected ORM behavior.
Read the post