Merge pull request #58 from rambocoder/pmods

Pmods for R16+ and updated tests
fixed bug in query generation
Merge pull request #60 from fscz/master

Fixed a bug in query generation in pgsql adapter
Support for pre-caching belongs_to associations
Merge remote-tracking branch 'upstream/master' into pmods