Here's a relatively minor thing I came across. For a client I had a project where they needed multiple dropdown sortable lists of pages based on CollectionAttributeValues that have controller of: "SelectAttributeTypeController", you know the ones that allow multiple or single select dropdowns.
So the issue we came across was that if you had a CollectionAttributeKey with an attribute type of select, when it is associated with that collection's collection type, by default this is set to NULL. The specifications for this app at the time were that they wanted to select everything that didn't have a value, which could by default be accomplished by:
$pl->filterByAttribute($attributeKeyFilter->getAttributeKeyHandle(), NULL,'IS NOT');
This will work if something never had the particular attribute(in this case $attributeKeyFilter) set at all. If this filter was set, then it was changed to or back to none, then you would think that the column/value would be set back to NULL, or ''. Actually, in this particular instance, it was set to "\n", which required either looking at it through the command line or checking out the actual value of the field in phpmyadmin using firebug or similar.
So
$pl->filterByAttribute($attributeKeyFilter->getAttributeKeyHandle(),"\n",'!=');
//you might want to experiment with other filters
is also needed(at least in my case) if you are trying to filter by something that isn't "blank", even after the CollectionAttributeKey has been changed for a particular collection.