/** * -fix all data with same id should be same object * -remove parents that are no not tin the tree * only call on root * */ public void fixDuplicatesAndAddBackReferences() { data.assertRoot(); List<Data> dataList = this.data.fixDuplicateObjects(); for (Data data : dataList) { data.resetBackReferencesFlat(); } this.data.addBackReferences(); }