湖光飞影 你的自己和挂载问题,正确应该这样挂载:
Sequoiadb sequoiadb = this.getSdbConnect();
//The parameters when mounting are mainly the upper and lower boundaries of the sub-table settings
BasicBSONObject attachOptions1 = new BasicBSONObject();
attachOptions1.put("LowBound", new BasicBSONObject("date", "20200401"));
attachOptions1.put("UpBound", new BasicBSONObject("date", "20200501"));
//Get the main table object
DBCollection mainCL = sequoiadb.getCollectionSpace("school").
getCollection("student");
DBCollection subCL1 = sequoiadb.getCollectionSpace("school").
getCollection("student_202004");
mainCL.attachCollection(subCL1.getFullName(), attachOptions1);
BasicBSONObject attachOptions2 = new BasicBSONObject();
attachOptions2.put("LowBound", new BasicBSONObject("date", "20200501"));
attachOptions2.put("UpBound", new BasicBSONObject("date", "20200601"));
DBCollection subCL2 = sequoiadb.getCollectionSpace("school").
getCollection("student_202005");
mainCL.attachCollection(subCL2.getFullName(), attachOptions2);