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.