quick fixes for mongoid to work

Please note that
1) generators are not changed, need to edit models manually
2) tests are not updated