neoform/PHP-Neoform — pull request #22 by neoform (2013-09-07 16:11:03+00:00)
Title: Many to many

Implemented many to many functions that have the ability to be ordered by fields found in the foreign table. Results can also be limited/offsetted, allowing for pagination.

Additionally, total counts can now be obtained for those many to many relationships (where the counts are filtered by relationship).

Example:

```php
city_collection([ 'name' => entity_dao::SORT_ASC ], 0, 10);

// Loads a count of cities found in each state
// Loaded as a multi-get, hitting DB with one query max, and cache with one query
$regions->city_count();