문제

I am using Lift Framework with Record as ORM and Mongo as database. Then I change used indexes, I go to remote mongo console, and ensure indexes by hand.

I want to automate it so that Lift will ensure indexes at every start of server.

도움이 되었습니까?

해결책

Anwser was found here:

  1. То do some action on app loading, simply put it in the class definition.
  2. MongoMeta has ensureIndex function which creates index just like MongoDB native ensureIndex does.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top