From 4121f273e41c64a9361d398346b2b90257817dec Mon Sep 17 00:00:00 2001 From: Olin Blodgett Date: Mon, 8 Jan 2024 12:13:44 -0500 Subject: [PATCH] Fixed fetch --- .../curation_api/model/entities/AGMDiseaseAnnotation.java | 5 ----- .../curation_api/model/entities/AlleleDiseaseAnnotation.java | 3 --- .../curation_api/model/entities/Annotation.java | 1 - .../curation_api/model/entities/CrossReference.java | 1 - 4 files changed, 10 deletions(-) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/AGMDiseaseAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/AGMDiseaseAnnotation.java index 7b95a455c..5623855a0 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/AGMDiseaseAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/AGMDiseaseAnnotation.java @@ -45,7 +45,6 @@ public class AGMDiseaseAnnotation extends DiseaseAnnotation { @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @Fetch(FetchMode.SELECT) @org.hibernate.annotations.OnDelete(action = org.hibernate.annotations.OnDeleteAction.CASCADE) @JoinColumn(foreignKey = @ForeignKey(name = "fk_agmdasubject")) @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) @@ -54,21 +53,18 @@ public class AGMDiseaseAnnotation extends DiseaseAnnotation { @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private Gene inferredGene; @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private Allele inferredAllele; @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToMany - @Fetch(FetchMode.SELECT) @JoinTable(indexes = @Index(columnList = "agmdiseaseannotation_id")) @JsonView({ View.FieldsAndLists.class, View.DiseaseAnnotation.class, View.ForPublic.class }) private List assertedGenes; @@ -76,7 +72,6 @@ public class AGMDiseaseAnnotation extends DiseaseAnnotation { @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private Allele assertedAllele; diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/AlleleDiseaseAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/AlleleDiseaseAnnotation.java index 0d5b40363..8065283d1 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/AlleleDiseaseAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/AlleleDiseaseAnnotation.java @@ -47,7 +47,6 @@ public class AlleleDiseaseAnnotation extends DiseaseAnnotation { @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @Fetch(FetchMode.SELECT) @org.hibernate.annotations.OnDelete(action = org.hibernate.annotations.OnDeleteAction.CASCADE) @JoinColumn(foreignKey = @ForeignKey(name = "fk_alleledasubject")) @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) @@ -56,14 +55,12 @@ public class AlleleDiseaseAnnotation extends DiseaseAnnotation { @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private Gene inferredGene; @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToMany - @Fetch(FetchMode.SELECT) @JoinTable(indexes = { @Index(columnList = "allelediseaseannotation_id"), @Index(columnList = "assertedgenes_curie")}) @JsonView({ View.FieldsAndLists.class, View.DiseaseAnnotation.class, View.ForPublic.class }) private List assertedGenes; diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java index 8b6a6da6d..a78506112 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java @@ -101,7 +101,6 @@ public class Annotation extends SingleReferenceAssociation { @IndexedEmbedded(includeDepth = 2) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) protected DataProvider dataProvider; diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/CrossReference.java b/src/main/java/org/alliancegenome/curation_api/model/entities/CrossReference.java index 4ada4b456..73631cc2a 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/CrossReference.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/CrossReference.java @@ -54,7 +54,6 @@ public class CrossReference extends GeneratedAuditedObject { @IndexedEmbedded(includeDepth = 1) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private ResourceDescriptorPage resourceDescriptorPage;