I'm trying to dynamically generate databases/collections on application startup, in case they do not exist yet. This works fine when working with the _system
database. The thing is that it seems not to be allowed when trying to switch to other databases. From the docs:
db._useDatabase(name)
Changes the current database to the database specified by name. Note that the database specified by name must already exist.
Changing the database might be disallowed in some contexts, for example server-side actions (including Foxx).
Does this mean that Foxx applications can only create collections within the _system
database? My manifest file sets the isSystem
property to false. What is the meaning of such limitation?