fixed a bug in the key-value schema query.
illegal sql was generated when the ruby object name is different from the table name.
The issue is now fixed and a test was added.
fixed code for active record 2 backward compatibility
Merge pull request #38 from abenari/master

Key value schema join construction error