Extract ORM specifics

rework of PR #454

a good case <https://github.com/advancedcontrol/doorkeeper-couchbase>
But it may raise `NameError` in `initialize_models`, we just want rescue THE `NameError` raised by `constantize`