Making persistence less restrictive for mongo db and other document db stores