Skip to content

Commit 7d2aeaf

Browse files
committed
Identify container field key in more tables. Exclude some tables.
1 parent 3b0b2d5 commit 7d2aeaf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

protein/src/org/labkey/protein/ProteinModule.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.labkey.api.data.DatabaseMigrationService;
2424
import org.labkey.api.data.DatabaseMigrationService.DefaultMigrationHandler;
2525
import org.labkey.api.data.SqlExecutor;
26+
import org.labkey.api.data.TableInfo;
2627
import org.labkey.api.data.TableSelector;
2728
import org.labkey.api.files.FileContentService;
2829
import org.labkey.api.files.TableUpdaterFileListener;
@@ -39,6 +40,7 @@
3940
import org.labkey.api.protein.query.CustomAnnotationSchema;
4041
import org.labkey.api.protein.query.ProteinUserSchema;
4142
import org.labkey.api.protein.search.MSSearchWebpart;
43+
import org.labkey.api.query.FieldKey;
4244
import org.labkey.api.usageMetrics.UsageMetricsService;
4345
import org.labkey.api.view.BaseWebPartFactory;
4446
import org.labkey.api.view.Portal;
@@ -138,6 +140,16 @@ public void beforeSchema()
138140
GoLoader.dropGoIndexes();
139141
}
140142

143+
@Override
144+
public @Nullable FieldKey getContainerFieldKey(TableInfo sourceTable)
145+
{
146+
return switch (sourceTable.getName())
147+
{
148+
case "AnnotationTypes", "AnnotInsertions", "FastaFiles", "FastaLoads", "GoGraphPath", "GoTerm", "GoTerm2Term", "GoTermDefinition", "GoTermSynonym", "Identifiers", "IdentTypes", "InfoSources", "SprotOrgMap" -> SITE_WIDE_TABLE;
149+
default -> super.getContainerFieldKey(sourceTable);
150+
};
151+
}
152+
141153
@Override
142154
public void afterSchema()
143155
{

0 commit comments

Comments
 (0)