有没有办法将来自其他 RavenDb 数据库实例的文档加载到我们当前的存储 session 中?
The question is based from not being able to have categorized collections in RavenDb studio, so it's annoying to scroll and find a desired collection!
In another word, having bounded-context in a same document store is not looking good, so the best solution is to split the stores to make it more efficient and readable as well.
我知道在同一个数据库实例中存储不同的限界上下文不是最佳实践,但如果我需要它怎么办!
更新:
Seems like Cross-Database functions are not available in RavenDb.
最佳答案
如果您需要在 2 个不同的 RavenDB 数据库之间传递信息/文档,那么您始终可以使用 External Replication Task 或 RavenDB ETL task .
RavenDB ETL 任务:
https://ravendb.net/docs/article-page/5.2/csharp/studio/database/tasks/ongoing-tasks/ravendb-etl-task
通过ETL 任务选项,您可以使用脚本来定义和/或过滤发送到其他 RavenDB 数据库的内容。一旦文档到达目标数据库,您就可以像往常一样使用/加载/包含。
关于data-modeling - RavenDb 不同数据库实例包含,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69912032/