Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2024-12-12 08:33:46 +00:00
commit a445b51a88

View File

@ -39,6 +39,10 @@ class SubAppPlugin extends Plugin {
subApp.db.on('beforeDefineCollection', (options) => {
const name = options.name;
if (name === 'roles') {
options.loadedFromCollectionManager = true;
}
// 共享的Collection指向主应用的 系统schema
if (sharedCollections.includes(name)) {
options.schema = mainApp.db.options.schema || 'public';