Refactor caching into separate methods. Add some comments and minor updates.
Fix up record existance test.
Support retrieving row ids.
Don't flag unchanged values as changed.
Return an array if not only a single row was requested.
Fix up related records.
Add support for many-many relations and make things a bit easier to use (where and having parameters as arrays).
Some minor changes.