From eee3aca093ffcdb1176631f6842e5db9877ef328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Tue, 10 Oct 2023 09:19:12 +0300 Subject: [PATCH 1/5] Add thesis type code in publication --- .../src/ApiModels/CodeList/CountryCode.cs | 2 +- .../src/ApiModels/CodeList/ThesisType.cs | 10 +++++++ .../src/ApiModels/Publication/Publication.cs | 11 ++++++-- .../src/Interface/Maps/PublicationProfile.cs | 1 + .../Repositories/Maps/PublicationProfile.cs | 1 + .../Service.Models/Publication/Publication.cs | 27 +++++++++++-------- 6 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 aspnetcore/src/ApiModels/CodeList/ThesisType.cs diff --git a/aspnetcore/src/ApiModels/CodeList/CountryCode.cs b/aspnetcore/src/ApiModels/CodeList/CountryCode.cs index f7998be..fd76d9c 100644 --- a/aspnetcore/src/ApiModels/CodeList/CountryCode.cs +++ b/aspnetcore/src/ApiModels/CodeList/CountryCode.cs @@ -1,7 +1,7 @@ namespace ResearchFi.CodeList; /// -/// Countriy codes +/// Country codes /// /// http://uri.suomi.fi/codelist/jhs/valtio_1_20120101 /// diff --git a/aspnetcore/src/ApiModels/CodeList/ThesisType.cs b/aspnetcore/src/ApiModels/CodeList/ThesisType.cs new file mode 100644 index 0000000..8ccd314 --- /dev/null +++ b/aspnetcore/src/ApiModels/CodeList/ThesisType.cs @@ -0,0 +1,10 @@ +namespace ResearchFi.CodeList; + + /// + /// Thesis types + /// + /// http://uri.suomi.fi/codelist/research/Opinnaytetyyppi + /// + public class ThesisType : CodeList + { + } \ No newline at end of file diff --git a/aspnetcore/src/ApiModels/Publication/Publication.cs b/aspnetcore/src/ApiModels/Publication/Publication.cs index cd0e861..f63ec50 100644 --- a/aspnetcore/src/ApiModels/Publication/Publication.cs +++ b/aspnetcore/src/ApiModels/Publication/Publication.cs @@ -70,6 +70,13 @@ public class Publication /// public PublicationType? Type { get; set; } + /// + /// Thesis type + /// + /// http://uri.suomi.fi/codelist/research/Opinnaytetyyppi + /// + public ThesisType? ThesisType { get; set; } + /// /// Journal name /// @@ -272,10 +279,10 @@ public class Publication /// /// Creation time /// - public DateTime Created { get; set; } + public DateTime? Created { get; set; } /// /// Modification time /// - public DateTime Modified { get; set; } + public DateTime? Modified { get; set; } } \ No newline at end of file diff --git a/aspnetcore/src/Interface/Maps/PublicationProfile.cs b/aspnetcore/src/Interface/Maps/PublicationProfile.cs index 88f08b7..cbf5b45 100644 --- a/aspnetcore/src/Interface/Maps/PublicationProfile.cs +++ b/aspnetcore/src/Interface/Maps/PublicationProfile.cs @@ -49,6 +49,7 @@ public PublicationProfile() CreateMap(); CreateMap(); CreateMap(); + CreateMap(); CreateMap(); } } \ No newline at end of file diff --git a/aspnetcore/src/Repositories/Maps/PublicationProfile.cs b/aspnetcore/src/Repositories/Maps/PublicationProfile.cs index c496e44..2af27f5 100644 --- a/aspnetcore/src/Repositories/Maps/PublicationProfile.cs +++ b/aspnetcore/src/Repositories/Maps/PublicationProfile.cs @@ -32,6 +32,7 @@ public PublicationProfile() .ForMember(dst => dst.DatabasePeerReviewed, opt => opt.MapFrom(src => src.PeerReviewed)) .ForMember(dst => dst.TargetAudience, opt => opt.MapFrom(src => src.TargetAudienceCodeNavigation)) .ForMember(dst => dst.Type, opt => opt.MapFrom(src => src.PublicationTypeCodeNavigation)) + .ForMember(dst => dst.ThesisType, opt => opt.MapFrom(src => src.ThesisTypeCodeNavigation)) .ForMember(dst => dst.JournalName, opt => opt.MapFrom(src => src.JournalName)) .ForMember(dst => dst.IssueNumber, opt => opt.MapFrom(src => src.IssueNumber)) .ForMember(dst => dst.ConferenceName, opt => opt.MapFrom(src => src.ConferenceName)) diff --git a/aspnetcore/src/Service.Models/Publication/Publication.cs b/aspnetcore/src/Service.Models/Publication/Publication.cs index d7a97eb..6983f58 100644 --- a/aspnetcore/src/Service.Models/Publication/Publication.cs +++ b/aspnetcore/src/Service.Models/Publication/Publication.cs @@ -24,7 +24,7 @@ public class Publication public DateTime? PublicationYear { get; set; } /// - /// Tekijäteksti + /// Tekijäteksti /// public string? AuthorsText { get; set; } @@ -34,7 +34,7 @@ public class Publication public List? Organizations { get; set; } /// - /// Tekijät + /// Tekijät /// public List? Authors { get; set; } @@ -49,7 +49,7 @@ public class Publication public ReferenceData? PeerReviewed { get; set; } /// - /// Yleisö + /// Yleisö /// public ReferenceData? TargetAudience { get; set; } @@ -58,6 +58,11 @@ public class Publication /// public ReferenceData? Type { get; set; } + /// + /// Opinnäytetyön tyyppi + /// + public ReferenceData? ThesisType { get; set; } + /// /// Lehti /// @@ -74,7 +79,7 @@ public class Publication public string? ConferenceName { get; set; } /// - /// Julkaisuun liittyvät ISSN tunnisteet + /// Julkaisuun liittyvät ISSN tunnisteet /// [Keyword] public List? Issn { get; set; } @@ -100,7 +105,7 @@ public class Publication public ParentPublication? ParentPublication { get; set; } /// - /// Julkaisuun liittyvät ISBN tunnisteet + /// Julkaisuun liittyvät ISBN tunnisteet /// [Keyword] public List? Isbn { get; set; } @@ -132,7 +137,7 @@ public class Publication public string? Doi { get; set; } /// - /// Pysyvä osoite + /// Pysyvä osoite /// [Keyword] public string? DoiHandle { get; set; } @@ -173,7 +178,7 @@ public class Publication public List? Keywords { get; set; } /// - /// Julkaisun kansainvälisyys + /// Julkaisun kansainvälisyys /// public bool? InternationalPublication { get; set; } @@ -188,7 +193,7 @@ public class Publication public ReferenceData? Language { get; set; } /// - /// Kansainvälinen yhteisjulkaisu + /// Kansainvälinen yhteisjulkaisu /// public bool? InternationalCollaboration { get; set; } @@ -238,19 +243,19 @@ public class Publication public List? ArtPublicationTypeCategory { get; set; } /// - /// Tiivistelmä + /// Tiivistelmä /// public string? Abstract { get; set; } /// /// Luontiaika /// - public DateTime Created { get; set; } + public DateTime? Created { get; set; } /// /// Muokkausaika /// - public DateTime Modified { get; set; } + public DateTime? Modified { get; set; } [Ignore] public string? Isbn1 { get; set; } From 10d582def56ac1b2a4a94d308d39c01373f607f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Thu, 12 Oct 2023 14:17:36 +0300 Subject: [PATCH 2/5] Update TTV database context, field of art --- .../src/ApiModels/CodeList/FieldOfArt.cs | 2 +- .../src/ApiModels/Publication/Publication.cs | 14 +- .../src/DatabaseContext/ApiDbContext.cs | 139 +----------------- .../Entities/DimFundingDecision.cs | 2 - .../Entities/DimPublication.cs | 6 +- .../Entities/DimReferencedatum.cs | 2 + aspnetcore/src/Interface/Interface.csproj | 2 +- .../src/Interface/Maps/PublicationProfile.cs | 2 +- .../Repositories/Maps/PublicationProfile.cs | 4 +- .../Service.Models/Publication/Publication.cs | 10 +- .../Maps/PublicationProfileTest.cs | 33 +---- .../Maps/PublicationProfileTest.cs | 18 +-- 12 files changed, 40 insertions(+), 194 deletions(-) diff --git a/aspnetcore/src/ApiModels/CodeList/FieldOfArt.cs b/aspnetcore/src/ApiModels/CodeList/FieldOfArt.cs index c77cb80..60e672b 100644 --- a/aspnetcore/src/ApiModels/CodeList/FieldOfArt.cs +++ b/aspnetcore/src/ApiModels/CodeList/FieldOfArt.cs @@ -5,6 +5,6 @@ /// /// http://uri.suomi.fi/codelist/research/Taiteenala /// -public class FieldOfArts : CodeList +public class FieldOfArt : CodeList { } \ No newline at end of file diff --git a/aspnetcore/src/ApiModels/Publication/Publication.cs b/aspnetcore/src/ApiModels/Publication/Publication.cs index f63ec50..1bf5bc8 100644 --- a/aspnetcore/src/ApiModels/Publication/Publication.cs +++ b/aspnetcore/src/ApiModels/Publication/Publication.cs @@ -192,6 +192,13 @@ public class Publication /// public List? FieldsOfEducation { get; set; } + /// + /// Field of art + /// + /// http://uri.suomi.fi/codelist/research/Taiteenala + /// + public FieldOfArt? FieldOfArt { get; set; } + /// /// Keywords /// @@ -257,13 +264,6 @@ public class Publication /// public License? License { get; set; } - /// - /// Field of art - /// - /// http://uri.suomi.fi/codelist/research/Taiteenala - /// - public List? FieldsOfArts { get; set; } - /// /// Art publications type category /// diff --git a/aspnetcore/src/DatabaseContext/ApiDbContext.cs b/aspnetcore/src/DatabaseContext/ApiDbContext.cs index 7b2615a..16e42e7 100644 --- a/aspnetcore/src/DatabaseContext/ApiDbContext.cs +++ b/aspnetcore/src/DatabaseContext/ApiDbContext.cs @@ -34,8 +34,6 @@ public ApiDbContext(DbContextOptions options) public virtual DbSet DimEvents { get; set; } = null!; public virtual DbSet DimExternalServices { get; set; } = null!; public virtual DbSet DimFieldDisplaySettings { get; set; } = null!; - public virtual DbSet DimFieldOfArts { get; set; } = null!; - public virtual DbSet DimFieldOfEducations { get; set; } = null!; public virtual DbSet DimFundingDecisions { get; set; } = null!; public virtual DbSet DimGeos { get; set; } = null!; public virtual DbSet DimIdentifierlessData { get; set; } = null!; @@ -1056,118 +1054,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) }); }); - modelBuilder.Entity(entity => - { - entity.ToTable("dim_field_of_art"); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.Created) - .HasColumnType("datetime") - .HasColumnName("created"); - - entity.Property(e => e.FieldId) - .HasMaxLength(255) - .HasColumnName("field_id"); - - entity.Property(e => e.Modified) - .HasColumnType("datetime") - .HasColumnName("modified"); - - entity.Property(e => e.NameEn) - .HasMaxLength(255) - .HasColumnName("name_en"); - - entity.Property(e => e.NameFi) - .HasMaxLength(255) - .HasColumnName("name_fi"); - - entity.Property(e => e.NameSv) - .HasMaxLength(255) - .HasColumnName("name_sv"); - - entity.Property(e => e.SourceDescription) - .HasMaxLength(255) - .HasColumnName("source_description"); - - entity.Property(e => e.SourceId) - .HasMaxLength(255) - .HasColumnName("source_id"); - - entity.HasMany(d => d.DimPublications) - .WithMany(p => p.DimFieldOfArts) - .UsingEntity>( - "BrFieldOfArtDimPublication", - l => l.HasOne().WithMany().HasForeignKey("DimPublicationId").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FKbr_field_o505394"), - r => r.HasOne().WithMany().HasForeignKey("DimFieldOfArtId").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FKbr_field_o978876"), - j => - { - j.HasKey("DimFieldOfArtId", "DimPublicationId").HasName("PK__br_field__809A87CDC51CB6D5"); - - j.ToTable("br_field_of_art_dim_publication"); - - j.IndexerProperty("DimFieldOfArtId").HasColumnName("dim_field_of_art_id"); - - j.IndexerProperty("DimPublicationId").HasColumnName("dim_publication_id"); - }); - }); - - modelBuilder.Entity(entity => - { - entity.ToTable("dim_field_of_education"); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.Created) - .HasColumnType("datetime") - .HasColumnName("created"); - - entity.Property(e => e.FieldId) - .HasMaxLength(255) - .HasColumnName("field_id"); - - entity.Property(e => e.Modified) - .HasColumnType("datetime") - .HasColumnName("modified"); - - entity.Property(e => e.NameEn) - .HasMaxLength(255) - .HasColumnName("name_en"); - - entity.Property(e => e.NameFi) - .HasMaxLength(255) - .HasColumnName("name_fi"); - - entity.Property(e => e.NameSv) - .HasMaxLength(255) - .HasColumnName("name_sv"); - - entity.Property(e => e.SourceDescription) - .HasMaxLength(255) - .HasColumnName("source_description"); - - entity.Property(e => e.SourceId) - .HasMaxLength(255) - .HasColumnName("source_id"); - - entity.HasMany(d => d.DimPublications) - .WithMany(p => p.DimFieldOfEducations) - .UsingEntity>( - "BrFieldOfEducationDimPublication", - l => l.HasOne().WithMany().HasForeignKey("DimPublicationId").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FKbr_field_o449658"), - r => r.HasOne().WithMany().HasForeignKey("DimFieldOfEducationId").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FKbr_field_o983513"), - j => - { - j.HasKey("DimFieldOfEducationId", "DimPublicationId").HasName("PK__br_field__6E377B2CD08233DA"); - - j.ToTable("br_field_of_education_dim_publication"); - - j.IndexerProperty("DimFieldOfEducationId").HasColumnName("dim_field_of_education_id"); - - j.IndexerProperty("DimPublicationId").HasColumnName("dim_publication_id"); - }); - }); - modelBuilder.Entity(entity => { entity.ToTable("dim_funding_decision"); @@ -1312,23 +1198,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FKdim_fundin974924"); - entity.HasMany(d => d.DimFieldOfArts) - .WithMany(p => p.DimFundingDecisions) - .UsingEntity>( - "BrFundingDecisionDimFieldOfArt", - l => l.HasOne().WithMany().HasForeignKey("DimFieldOfArtId").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FKbr_funding154428"), - r => r.HasOne().WithMany().HasForeignKey("DimFundingDecisionId").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FKbr_funding281737"), - j => - { - j.HasKey("DimFundingDecisionId", "DimFieldOfArtId").HasName("PK__br_fundi__07CB586D2869F096"); - - j.ToTable("br_funding_decision_dim_field_of_art"); - - j.IndexerProperty("DimFundingDecisionId").HasColumnName("dim_funding_decision_id"); - - j.IndexerProperty("DimFieldOfArtId").HasColumnName("dim_field_of_art_id"); - }); - entity.HasMany(d => d.DimFundingDecisionFroms) .WithMany(p => p.DimFundingDecisionTos) .UsingEntity>( @@ -2949,6 +2818,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasMaxLength(4000) .HasColumnName("doi_handle"); + entity.Property(e => e.FieldOfArtCode).HasColumnName("field_of_art_code"); + entity.Property(e => e.GovermentCollaboration).HasColumnName("goverment_collaboration"); entity.Property(e => e.HospitalDistrictCollaboration).HasColumnName("hospital_district_collaboration"); @@ -3104,6 +2975,12 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FKdim_public896887"); + entity.HasOne(d => d.FieldOfArtCodeNavigation) + .WithMany(p => p.DimPublicationFieldOfArtCodeNavigations) + .HasForeignKey(d => d.FieldOfArtCode) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("field_of_art_code"); + entity.HasOne(d => d.LanguageCodeNavigation) .WithMany(p => p.DimPublicationLanguageCodeNavigations) .HasForeignKey(d => d.LanguageCode) diff --git a/aspnetcore/src/DatabaseContext/Entities/DimFundingDecision.cs b/aspnetcore/src/DatabaseContext/Entities/DimFundingDecision.cs index 8ced0b5..949a124 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimFundingDecision.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimFundingDecision.cs @@ -16,7 +16,6 @@ public DimFundingDecision() FactDimReferencedataFieldOfSciences = new HashSet(); FactFieldValues = new HashSet(); InverseDimFundingDecisionIdParentDecisionNavigation = new HashSet(); - DimFieldOfArts = new HashSet(); DimFundingDecisionFroms = new HashSet(); DimFundingDecisionFromsNavigation = new HashSet(); DimFundingDecisionTos = new HashSet(); @@ -75,7 +74,6 @@ public DimFundingDecision() public virtual ICollection FactFieldValues { get; set; } public virtual ICollection InverseDimFundingDecisionIdParentDecisionNavigation { get; set; } - public virtual ICollection DimFieldOfArts { get; set; } public virtual ICollection DimFundingDecisionFroms { get; set; } public virtual ICollection DimFundingDecisionFromsNavigation { get; set; } public virtual ICollection DimFundingDecisionTos { get; set; } diff --git a/aspnetcore/src/DatabaseContext/Entities/DimPublication.cs b/aspnetcore/src/DatabaseContext/Entities/DimPublication.cs index 26d2086..80ae98d 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimPublication.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimPublication.cs @@ -12,8 +12,6 @@ public DimPublication() FactContributions = new HashSet(); FactDimReferencedataFieldOfSciences = new HashSet(); FactFieldValues = new HashSet(); - DimFieldOfArts = new HashSet(); - DimFieldOfEducations = new HashSet(); DimKeywords = new HashSet(); DimReferencedata = new HashSet(); } @@ -77,9 +75,11 @@ public DimPublication() public string? OpenAccess { get; set; } public string? PublisherOpenAccessCode { get; set; } public string? Abstract { get; set; } + public int FieldOfArtCode { get; set; } public virtual DimReferencedatum? ArticleTypeCodeNavigation { get; set; } public virtual DimRegisteredDataSource DimRegisteredDataSource { get; set; } = null!; + public virtual DimReferencedatum FieldOfArtCodeNavigation { get; set; } = null!; public virtual DimReferencedatum LanguageCodeNavigation { get; set; } = null!; public virtual DimReferencedatum LicenseCodeNavigation { get; set; } = null!; public virtual DimReferencedatum? ParentPublicationTypeCodeNavigation { get; set; } @@ -94,8 +94,6 @@ public DimPublication() public virtual ICollection FactDimReferencedataFieldOfSciences { get; set; } public virtual ICollection FactFieldValues { get; set; } - public virtual ICollection DimFieldOfArts { get; set; } - public virtual ICollection DimFieldOfEducations { get; set; } public virtual ICollection DimKeywords { get; set; } public virtual ICollection DimReferencedata { get; set; } } diff --git a/aspnetcore/src/DatabaseContext/Entities/DimReferencedatum.cs b/aspnetcore/src/DatabaseContext/Entities/DimReferencedatum.cs index 82f0999..c9c40c3 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimReferencedatum.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimReferencedatum.cs @@ -23,6 +23,7 @@ public DimReferencedatum() DimProfileOnlyPublicationThesisTypeCodeNavigations = new HashSet(); DimProfileOnlyPublicationTypeClassificationCodeNavigations = new HashSet(); DimPublicationArticleTypeCodeNavigations = new HashSet(); + DimPublicationFieldOfArtCodeNavigations = new HashSet(); DimPublicationLanguageCodeNavigations = new HashSet(); DimPublicationLicenseCodeNavigations = new HashSet(); DimPublicationParentPublicationTypeCodeNavigations = new HashSet(); @@ -76,6 +77,7 @@ public DimReferencedatum() public virtual ICollection DimProfileOnlyPublicationThesisTypeCodeNavigations { get; set; } public virtual ICollection DimProfileOnlyPublicationTypeClassificationCodeNavigations { get; set; } public virtual ICollection DimPublicationArticleTypeCodeNavigations { get; set; } + public virtual ICollection DimPublicationFieldOfArtCodeNavigations { get; set; } public virtual ICollection DimPublicationLanguageCodeNavigations { get; set; } public virtual ICollection DimPublicationLicenseCodeNavigations { get; set; } public virtual ICollection DimPublicationParentPublicationTypeCodeNavigations { get; set; } diff --git a/aspnetcore/src/Interface/Interface.csproj b/aspnetcore/src/Interface/Interface.csproj index d61b482..7d8ed7a 100644 --- a/aspnetcore/src/Interface/Interface.csproj +++ b/aspnetcore/src/Interface/Interface.csproj @@ -4,7 +4,7 @@ net6.0 enable enable - fb1549e6-e7b1-45b6-91cb-dfebd31eadb8 + b73bde99-06bf-406c-8e60-eb475cb00acc Linux ..\..\src\Api ..\..\openshift\api\Dockerfile diff --git a/aspnetcore/src/Interface/Maps/PublicationProfile.cs b/aspnetcore/src/Interface/Maps/PublicationProfile.cs index cbf5b45..1094cb0 100644 --- a/aspnetcore/src/Interface/Maps/PublicationProfile.cs +++ b/aspnetcore/src/Interface/Maps/PublicationProfile.cs @@ -39,7 +39,7 @@ public PublicationProfile() CreateMap(); CreateMap(); CreateMap(); - CreateMap(); + CreateMap(); CreateMap(); CreateMap(); CreateMap(); diff --git a/aspnetcore/src/Repositories/Maps/PublicationProfile.cs b/aspnetcore/src/Repositories/Maps/PublicationProfile.cs index 2af27f5..36243da 100644 --- a/aspnetcore/src/Repositories/Maps/PublicationProfile.cs +++ b/aspnetcore/src/Repositories/Maps/PublicationProfile.cs @@ -1,6 +1,7 @@ using CSC.PublicApi.DatabaseContext.Entities; using CSC.PublicApi.Service.Models; using CSC.PublicApi.Service.Models.Publication; +using Microsoft.Data.SqlClient; using FactContribution = CSC.PublicApi.Service.Models.Publication.FactContribution; using Name = CSC.PublicApi.Service.Models.Publication.Name; using Profile = AutoMapper.Profile; @@ -54,7 +55,7 @@ public PublicationProfile() .ForMember(dst => dst.Doi, opt => opt.MapFrom(src => src.Doi)) .ForMember(dst => dst.DoiHandle, opt => opt.MapFrom(src => src.DoiHandle)) .ForMember(dst => dst.FieldsOfScience, opt => opt.MapFrom(src => src.FactDimReferencedataFieldOfSciences.Select(f => f.DimReferencedata))) - .ForMember(dst => dst.FieldsOfEducation, opt => opt.MapFrom(src => src.DimFieldOfEducations)) + .ForMember(dst => dst.FieldOfArt, opt => opt.MapFrom(src => src.FieldOfArtCodeNavigation)) .ForMember(dst => dst.Keywords, opt => opt.MapFrom(src => src.DimKeywords)) .ForMember(dst => dst.InternationalPublication, opt => opt.MapFrom(src => src.InternationalPublication != 9 ? src.InternationalPublication == 1 : (bool?)null)) // 0 = kotim. 1 ulkom. 9 = ei tietoa. .ForMember(dst => dst.Country, opt => opt.MapFrom(src => src.PublicationCountryCodeNavigation)) @@ -67,7 +68,6 @@ public PublicationProfile() .ForMember(dst => dst.License, opt => opt.MapFrom(src => src.LicenseCodeNavigation.Id != -1 ? src.LicenseCodeNavigation : null)) .ForMember(dst => dst.Preprint, opt => opt.MapFrom(src => src.DimLocallyReportedPubInfos.Where(i => i.SelfArchivedType == PreprintType))) .ForMember(dst => dst.SelfArchived, opt => opt.MapFrom(src => src.DimLocallyReportedPubInfos.Where(i => i.SelfArchivedType == SelfArchivedType))) - .ForMember(dst => dst.FieldsOfArts, opt => opt.MapFrom(src => src.DimFieldOfArts)) .ForMember(dst => dst.ArtPublicationTypeCategory, opt => opt.MapFrom(src => src.DimReferencedata)) .ForMember(dst => dst.Abstract, opt => opt.MapFrom(src => src.Abstract)) .ForMember(dst => dst.Created, opt => opt.MapFrom(src => src.Created)) diff --git a/aspnetcore/src/Service.Models/Publication/Publication.cs b/aspnetcore/src/Service.Models/Publication/Publication.cs index 6983f58..3bf58ee 100644 --- a/aspnetcore/src/Service.Models/Publication/Publication.cs +++ b/aspnetcore/src/Service.Models/Publication/Publication.cs @@ -172,6 +172,11 @@ public class Publication /// public List? FieldsOfEducation { get; set; } + /// + /// Taiteenala + /// + public ReferenceData? FieldOfArt { get; set; } + /// /// Avainsanat /// @@ -232,11 +237,6 @@ public class Publication /// public ReferenceData? License { get; set; } - /// - /// Taiteenala - /// - public List? FieldsOfArts { get; set; } - /// /// TaidealanTyyppiKategoria /// diff --git a/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs b/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs index 5d68d9e..908b663 100644 --- a/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs +++ b/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs @@ -110,16 +110,6 @@ private static DimPublication GetEntity() JufoClassCode = "jufoClassCode", Doi = "doi", DoiHandle = "doiHandle", - DimFieldOfEducations = new List - { - new() - { - FieldId = "foeFieldId", - NameFi = "foeNameFi", - NameSv = "foeNameSv", - NameEn = "foeNameEn" - } - }, DimReferencedata = new List { new() @@ -258,16 +248,6 @@ private static DimPublication GetEntity() SelfArchivedType = "preprint" } }, - DimFieldOfArts = new List - { - new() - { - FieldId = "fieldOfArtsId", - NameFi = "fieldOfArtsNameFi", - NameSv = "fieldOfArtsNameSv", - NameEn = "fieldOfArtsNameEn" - } - }, Abstract = "abstract", Created = new DateTime(2023, 3, 10, 10, 43, 00), Modified = new DateTime(2023, 3, 10, 10, 44, 00) @@ -463,15 +443,12 @@ private Publication GetModel() EmbargoDate = new DateTime(2023, 3, 10, 10, 40, 00) } }, - FieldsOfArts = new List + FieldOfArt = new ReferenceData() { - new() - { - Code = "fieldOfArtsId", - NameFi = "fieldOfArtsNameFi", - NameSv = "fieldOfArtsNameSv", - NameEn = "fieldOfArtsNameEn" - } + Code = "123", + NameEn = "fieldOfArtCodeNameEn", + NameFi = "fieldOfArtCodeNameFi", + NameSv = "fieldOfArtCodeNameSv", }, Abstract = "abstract", ArtPublicationTypeCategory = new List diff --git a/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs b/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs index f32f5d1..095ac3d 100644 --- a/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs +++ b/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs @@ -283,15 +283,12 @@ private static object GetServiceModel() EmbargoDate = new DateTime(2023, 3, 10, 10, 40, 00) } }, - FieldsOfArts = new List + FieldOfArt = new ReferenceData { - new() - { Code = "fieldOfArtsId", NameFi = "fieldOfArtsNameFi", NameSv = "fieldOfArtsNameSv", NameEn = "fieldOfArtsNameEn" - } }, Abstract = "abstract", ArtPublicationTypeCategory = new List @@ -495,15 +492,12 @@ private static object GetApiModel() EmbargoDate = new DateTime(2023, 3, 10, 10, 40, 00) } }, - FieldsOfArts = new List + FieldOfArt = new FieldOfArt { - new() - { - Code = "fieldOfArtsId", - NameFi = "fieldOfArtsNameFi", - NameSv = "fieldOfArtsNameSv", - NameEn = "fieldOfArtsNameEn" - } + Code = "fieldOfArtsId", + NameFi = "fieldOfArtsNameFi", + NameSv = "fieldOfArtsNameSv", + NameEn = "fieldOfArtsNameEn" }, Abstract = "abstract", ArtPublicationTypeCategory = new List From b16e995ac0d15ddef03ed243fdffe45332112e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Fri, 13 Oct 2023 10:19:22 +0300 Subject: [PATCH 3/5] Fix test case errors --- .../src/ApiModels/Publication/Publication.cs | 7 ------- .../Service.Models/Publication/Publication.cs | 5 ----- .../Maps/PublicationProfileTest.cs | 17 +++++++--------- .../Maps/PublicationProfileTest.cs | 20 ------------------- 4 files changed, 7 insertions(+), 42 deletions(-) diff --git a/aspnetcore/src/ApiModels/Publication/Publication.cs b/aspnetcore/src/ApiModels/Publication/Publication.cs index 1bf5bc8..d671e11 100644 --- a/aspnetcore/src/ApiModels/Publication/Publication.cs +++ b/aspnetcore/src/ApiModels/Publication/Publication.cs @@ -185,13 +185,6 @@ public class Publication /// public List? FieldsOfScience { get; set; } - /// - /// Areas of guidance of the MEC - /// - /// https://wiki.eduuni.fi/display/cscsuorat/7.2+OKM%3An+ohjauksen+alat+2022 - /// - public List? FieldsOfEducation { get; set; } - /// /// Field of art /// diff --git a/aspnetcore/src/Service.Models/Publication/Publication.cs b/aspnetcore/src/Service.Models/Publication/Publication.cs index 3bf58ee..e51fb6c 100644 --- a/aspnetcore/src/Service.Models/Publication/Publication.cs +++ b/aspnetcore/src/Service.Models/Publication/Publication.cs @@ -167,11 +167,6 @@ public class Publication /// public List? FieldsOfScience { get; set; } - /// - /// OKM:n ohjauksen ala - /// - public List? FieldsOfEducation { get; set; } - /// /// Taiteenala /// diff --git a/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs b/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs index 908b663..70b81b2 100644 --- a/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs +++ b/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs @@ -248,6 +248,13 @@ private static DimPublication GetEntity() SelfArchivedType = "preprint" } }, + FieldOfArtCodeNavigation = new DimReferencedatum() + { + CodeValue = "123", + NameEn = "fieldOfArtCodeNameEn", + NameFi = "fieldOfArtCodeNameFi", + NameSv = "fieldOfArtCodeNameSv", + }, Abstract = "abstract", Created = new DateTime(2023, 3, 10, 10, 43, 00), Modified = new DateTime(2023, 3, 10, 10, 44, 00) @@ -314,16 +321,6 @@ private Publication GetModel() }, Doi = "doi", DoiHandle = "doiHandle", - FieldsOfEducation = new List - { - new() - { - Code = "foeFieldId", - NameFi = "foeNameFi", - NameSv = "foeNameSv", - NameEn = "foeNameEn" - } - }, Keywords = new List { new() diff --git a/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs b/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs index 095ac3d..6b65d26 100644 --- a/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs +++ b/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs @@ -142,16 +142,6 @@ private static object GetServiceModel() }, Doi = "doi", DoiHandle = "doiHandle", - FieldsOfEducation = new List - { - new() - { - Code = "foeFieldId", - NameFi = "foeNameFi", - NameSv = "foeNameSv", - NameEn = "foeNameEn" - } - }, Keywords = new List { new() @@ -378,16 +368,6 @@ private static object GetApiModel() }, Doi = "doi", DoiHandle = "doiHandle", - FieldsOfEducation = new List - { - new() - { - Code = "foeFieldId", - NameFi = "foeNameFi", - NameSv = "foeNameSv", - NameEn = "foeNameEn" - } - }, Keywords = new List { new() From 01b43435c768a8ac8a4c5b6a84e98814c3d1df4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Wed, 18 Oct 2023 12:18:10 +0300 Subject: [PATCH 4/5] Update TTV database context, publication can have may fields of art --- .../src/ApiModels/Publication/Publication.cs | 4 +- .../src/DatabaseContext/ApiDbContext.cs | 25 ++++++--- .../Entities/DimPublication.cs | 4 +- .../Entities/DimReferencedatum.cs | 4 +- .../Repositories/Maps/PublicationProfile.cs | 2 +- .../Service.Models/Publication/Publication.cs | 4 +- .../Maps/PublicationProfileTest.cs | 52 +++++++++++-------- .../Maps/PublicationProfileTest.cs | 33 +++++++----- 8 files changed, 74 insertions(+), 54 deletions(-) diff --git a/aspnetcore/src/ApiModels/Publication/Publication.cs b/aspnetcore/src/ApiModels/Publication/Publication.cs index d671e11..11b0e13 100644 --- a/aspnetcore/src/ApiModels/Publication/Publication.cs +++ b/aspnetcore/src/ApiModels/Publication/Publication.cs @@ -186,11 +186,11 @@ public class Publication public List? FieldsOfScience { get; set; } /// - /// Field of art + /// Fields of art /// /// http://uri.suomi.fi/codelist/research/Taiteenala /// - public FieldOfArt? FieldOfArt { get; set; } + public List? FieldsOfArt { get; set; } /// /// Keywords diff --git a/aspnetcore/src/DatabaseContext/ApiDbContext.cs b/aspnetcore/src/DatabaseContext/ApiDbContext.cs index 16e42e7..3b330bd 100644 --- a/aspnetcore/src/DatabaseContext/ApiDbContext.cs +++ b/aspnetcore/src/DatabaseContext/ApiDbContext.cs @@ -2818,8 +2818,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasMaxLength(4000) .HasColumnName("doi_handle"); - entity.Property(e => e.FieldOfArtCode).HasColumnName("field_of_art_code"); - entity.Property(e => e.GovermentCollaboration).HasColumnName("goverment_collaboration"); entity.Property(e => e.HospitalDistrictCollaboration).HasColumnName("hospital_district_collaboration"); @@ -2975,12 +2973,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FKdim_public896887"); - entity.HasOne(d => d.FieldOfArtCodeNavigation) - .WithMany(p => p.DimPublicationFieldOfArtCodeNavigations) - .HasForeignKey(d => d.FieldOfArtCode) - .OnDelete(DeleteBehavior.ClientSetNull) - .HasConstraintName("field_of_art_code"); - entity.HasOne(d => d.LanguageCodeNavigation) .WithMany(p => p.DimPublicationLanguageCodeNavigations) .HasForeignKey(d => d.LanguageCode) @@ -3173,6 +3165,23 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasForeignKey(d => d.DimReferencedataId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("FK_dim_referencedata_dim_referencedata"); + + entity.HasMany(d => d.DimPublicationsNavigation) + .WithMany(p => p.DimReferencedataNavigation) + .UsingEntity>( + "FactDimReferencedataFieldOfArt", + l => l.HasOne().WithMany().HasForeignKey("DimPublicationId").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("field_of_art_code"), + r => r.HasOne().WithMany().HasForeignKey("DimReferencedataId").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FKfact_dim_r130466"), + j => + { + j.HasKey("DimReferencedataId", "DimPublicationId").HasName("PK__fact_dim__FD761943629A8020"); + + j.ToTable("fact_dim_referencedata_field_of_art"); + + j.IndexerProperty("DimReferencedataId").HasColumnName("dim_referencedata_id"); + + j.IndexerProperty("DimPublicationId").HasColumnName("dim_publication id"); + }); }); modelBuilder.Entity(entity => diff --git a/aspnetcore/src/DatabaseContext/Entities/DimPublication.cs b/aspnetcore/src/DatabaseContext/Entities/DimPublication.cs index 80ae98d..1fbff40 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimPublication.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimPublication.cs @@ -14,6 +14,7 @@ public DimPublication() FactFieldValues = new HashSet(); DimKeywords = new HashSet(); DimReferencedata = new HashSet(); + DimReferencedataNavigation = new HashSet(); } public int Id { get; set; } @@ -75,11 +76,9 @@ public DimPublication() public string? OpenAccess { get; set; } public string? PublisherOpenAccessCode { get; set; } public string? Abstract { get; set; } - public int FieldOfArtCode { get; set; } public virtual DimReferencedatum? ArticleTypeCodeNavigation { get; set; } public virtual DimRegisteredDataSource DimRegisteredDataSource { get; set; } = null!; - public virtual DimReferencedatum FieldOfArtCodeNavigation { get; set; } = null!; public virtual DimReferencedatum LanguageCodeNavigation { get; set; } = null!; public virtual DimReferencedatum LicenseCodeNavigation { get; set; } = null!; public virtual DimReferencedatum? ParentPublicationTypeCodeNavigation { get; set; } @@ -96,5 +95,6 @@ public DimPublication() public virtual ICollection DimKeywords { get; set; } public virtual ICollection DimReferencedata { get; set; } + public virtual ICollection DimReferencedataNavigation { get; set; } } } diff --git a/aspnetcore/src/DatabaseContext/Entities/DimReferencedatum.cs b/aspnetcore/src/DatabaseContext/Entities/DimReferencedatum.cs index c9c40c3..214ebba 100644 --- a/aspnetcore/src/DatabaseContext/Entities/DimReferencedatum.cs +++ b/aspnetcore/src/DatabaseContext/Entities/DimReferencedatum.cs @@ -23,7 +23,6 @@ public DimReferencedatum() DimProfileOnlyPublicationThesisTypeCodeNavigations = new HashSet(); DimProfileOnlyPublicationTypeClassificationCodeNavigations = new HashSet(); DimPublicationArticleTypeCodeNavigations = new HashSet(); - DimPublicationFieldOfArtCodeNavigations = new HashSet(); DimPublicationLanguageCodeNavigations = new HashSet(); DimPublicationLicenseCodeNavigations = new HashSet(); DimPublicationParentPublicationTypeCodeNavigations = new HashSet(); @@ -43,6 +42,7 @@ public DimReferencedatum() InverseDimReferencedata = new HashSet(); DimCallProgrammes = new HashSet(); DimPublications = new HashSet(); + DimPublicationsNavigation = new HashSet(); DimResearchDatasets = new HashSet(); } @@ -77,7 +77,6 @@ public DimReferencedatum() public virtual ICollection DimProfileOnlyPublicationThesisTypeCodeNavigations { get; set; } public virtual ICollection DimProfileOnlyPublicationTypeClassificationCodeNavigations { get; set; } public virtual ICollection DimPublicationArticleTypeCodeNavigations { get; set; } - public virtual ICollection DimPublicationFieldOfArtCodeNavigations { get; set; } public virtual ICollection DimPublicationLanguageCodeNavigations { get; set; } public virtual ICollection DimPublicationLicenseCodeNavigations { get; set; } public virtual ICollection DimPublicationParentPublicationTypeCodeNavigations { get; set; } @@ -98,6 +97,7 @@ public DimReferencedatum() public virtual ICollection DimCallProgrammes { get; set; } public virtual ICollection DimPublications { get; set; } + public virtual ICollection DimPublicationsNavigation { get; set; } public virtual ICollection DimResearchDatasets { get; set; } } } diff --git a/aspnetcore/src/Repositories/Maps/PublicationProfile.cs b/aspnetcore/src/Repositories/Maps/PublicationProfile.cs index 36243da..8ef5259 100644 --- a/aspnetcore/src/Repositories/Maps/PublicationProfile.cs +++ b/aspnetcore/src/Repositories/Maps/PublicationProfile.cs @@ -55,7 +55,7 @@ public PublicationProfile() .ForMember(dst => dst.Doi, opt => opt.MapFrom(src => src.Doi)) .ForMember(dst => dst.DoiHandle, opt => opt.MapFrom(src => src.DoiHandle)) .ForMember(dst => dst.FieldsOfScience, opt => opt.MapFrom(src => src.FactDimReferencedataFieldOfSciences.Select(f => f.DimReferencedata))) - .ForMember(dst => dst.FieldOfArt, opt => opt.MapFrom(src => src.FieldOfArtCodeNavigation)) + .ForMember(dst => dst.FieldsOfArt, opt => opt.MapFrom(src => src.DimReferencedataNavigation)) .ForMember(dst => dst.Keywords, opt => opt.MapFrom(src => src.DimKeywords)) .ForMember(dst => dst.InternationalPublication, opt => opt.MapFrom(src => src.InternationalPublication != 9 ? src.InternationalPublication == 1 : (bool?)null)) // 0 = kotim. 1 ulkom. 9 = ei tietoa. .ForMember(dst => dst.Country, opt => opt.MapFrom(src => src.PublicationCountryCodeNavigation)) diff --git a/aspnetcore/src/Service.Models/Publication/Publication.cs b/aspnetcore/src/Service.Models/Publication/Publication.cs index e51fb6c..31a86a3 100644 --- a/aspnetcore/src/Service.Models/Publication/Publication.cs +++ b/aspnetcore/src/Service.Models/Publication/Publication.cs @@ -168,9 +168,9 @@ public class Publication public List? FieldsOfScience { get; set; } /// - /// Taiteenala + /// Taiteenalat /// - public ReferenceData? FieldOfArt { get; set; } + public List? FieldsOfArt { get; set; } /// /// Avainsanat diff --git a/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs b/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs index 70b81b2..4d727b0 100644 --- a/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs +++ b/aspnetcore/test/Indexer.Tests/Maps/PublicationProfileTest.cs @@ -110,16 +110,6 @@ private static DimPublication GetEntity() JufoClassCode = "jufoClassCode", Doi = "doi", DoiHandle = "doiHandle", - DimReferencedata = new List - { - new() - { - CodeValue = "artPublicationTypeCategory", - NameFi = "artPublicationTypeNameFi", - NameSv = "artPublicationTypeNameSv", - NameEn = "artPublicationTypeNameEn" - } - }, DimKeywords = new List { new() @@ -180,6 +170,16 @@ private static DimPublication GetEntity() } } }, + DimReferencedataNavigation = new List // fields of art + { + new() + { + CodeValue = "123", + NameEn = "fieldOfArtCodeNameEn", + NameFi = "fieldOfArtCodeNameFi", + NameSv = "fieldOfArtCodeNameSv", + } + }, LanguageCodeNavigation = new DimReferencedatum { CodeValue = "languageCode", @@ -248,14 +248,17 @@ private static DimPublication GetEntity() SelfArchivedType = "preprint" } }, - FieldOfArtCodeNavigation = new DimReferencedatum() + Abstract = "abstract", + DimReferencedata = new List { - CodeValue = "123", - NameEn = "fieldOfArtCodeNameEn", - NameFi = "fieldOfArtCodeNameFi", - NameSv = "fieldOfArtCodeNameSv", + new() + { + CodeValue = "artPublicationTypeCategory", + NameFi = "artPublicationTypeNameFi", + NameSv = "artPublicationTypeNameSv", + NameEn = "artPublicationTypeNameEn" + } }, - Abstract = "abstract", Created = new DateTime(2023, 3, 10, 10, 43, 00), Modified = new DateTime(2023, 3, 10, 10, 44, 00) }; @@ -367,6 +370,16 @@ private Publication GetModel() NameEn = "fieldOfScienceNameEn" } }, + FieldsOfArt = new List + { + new() + { + Code = "123", + NameEn = "fieldOfArtCodeNameEn", + NameFi = "fieldOfArtCodeNameFi", + NameSv = "fieldOfArtCodeNameSv", + } + }, Language = new ReferenceData { Code = "languageCode", @@ -440,13 +453,6 @@ private Publication GetModel() EmbargoDate = new DateTime(2023, 3, 10, 10, 40, 00) } }, - FieldOfArt = new ReferenceData() - { - Code = "123", - NameEn = "fieldOfArtCodeNameEn", - NameFi = "fieldOfArtCodeNameFi", - NameSv = "fieldOfArtCodeNameSv", - }, Abstract = "abstract", ArtPublicationTypeCategory = new List { diff --git a/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs b/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs index 6b65d26..b3925b7 100644 --- a/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs +++ b/aspnetcore/test/Interface.Tests/Maps/PublicationProfileTest.cs @@ -215,6 +215,16 @@ private static object GetServiceModel() NameEn = "fieldOfScienceNameEn" } }, + FieldsOfArt = new List + { + new() + { + Code = "fieldOfArtId", + NameFi = "fieldOfArtNameFi", + NameSv = "fieldOfArtNameSv", + NameEn = "fieldOfArtNameEn" + } + }, Language = new ReferenceData { Code = "languageCode" @@ -273,13 +283,6 @@ private static object GetServiceModel() EmbargoDate = new DateTime(2023, 3, 10, 10, 40, 00) } }, - FieldOfArt = new ReferenceData - { - Code = "fieldOfArtsId", - NameFi = "fieldOfArtsNameFi", - NameSv = "fieldOfArtsNameSv", - NameEn = "fieldOfArtsNameEn" - }, Abstract = "abstract", ArtPublicationTypeCategory = new List { @@ -414,6 +417,15 @@ private static object GetApiModel() NameEn = "fieldOfScienceNameEn" } }, + FieldsOfArt = new List + { + new() { + Code = "fieldOfArtId", + NameFi = "fieldOfArtNameFi", + NameSv = "fieldOfArtNameSv", + NameEn = "fieldOfArtNameEn" + } + }, Language = new Language { Code = "languageCode" @@ -472,13 +484,6 @@ private static object GetApiModel() EmbargoDate = new DateTime(2023, 3, 10, 10, 40, 00) } }, - FieldOfArt = new FieldOfArt - { - Code = "fieldOfArtsId", - NameFi = "fieldOfArtsNameFi", - NameSv = "fieldOfArtsNameSv", - NameEn = "fieldOfArtsNameEn" - }, Abstract = "abstract", ArtPublicationTypeCategory = new List { From 87deee021dc9d562f681ebea1387bf5d8052d3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Wed, 18 Oct 2023 13:44:21 +0300 Subject: [PATCH 5/5] Rename fact_dim_referencedata_field_of_art.dim_publication_id --- aspnetcore/src/DatabaseContext/ApiDbContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/src/DatabaseContext/ApiDbContext.cs b/aspnetcore/src/DatabaseContext/ApiDbContext.cs index 3b330bd..bca4c85 100644 --- a/aspnetcore/src/DatabaseContext/ApiDbContext.cs +++ b/aspnetcore/src/DatabaseContext/ApiDbContext.cs @@ -3180,7 +3180,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) j.IndexerProperty("DimReferencedataId").HasColumnName("dim_referencedata_id"); - j.IndexerProperty("DimPublicationId").HasColumnName("dim_publication id"); + j.IndexerProperty("DimPublicationId").HasColumnName("dim_publication_id"); }); });