Plugin using mongoose in infrastructure framework