This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-22133-bak in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit fcc248bb7085e1c5311827b2d518ec056117a40a Author: Pavel Tupitsyn <[email protected]> AuthorDate: Fri Jul 11 17:27:09 2025 +0300 Fix NorthwindIgniteContext - all tables created now --- .../TestModels/Northwind/NorthwindIgniteContext.cs | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestModels/Northwind/NorthwindIgniteContext.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestModels/Northwind/NorthwindIgniteContext.cs index 34d6a841f6c..d96e283cd81 100644 --- a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestModels/Northwind/NorthwindIgniteContext.cs +++ b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestModels/Northwind/NorthwindIgniteContext.cs @@ -30,24 +30,20 @@ public class NorthwindIgniteContext : NorthwindRelationalContext base.OnModelCreating(modelBuilder); // Add primary keys - Ignite does not support PK-less entities. - modelBuilder.Entity<CustomerQuery>().Property<Guid>("id") + AddId<CustomerQuery>(modelBuilder); + AddId<CustomerQueryWithQueryFilter>(modelBuilder); + AddId<ProductQuery>(modelBuilder); + } + + private static void AddId<T>(ModelBuilder modelBuilder) + where T : class + { + var entity = modelBuilder.Entity<T>(); + + entity.Property<Guid>("id") .HasColumnType("uuid") .HasDefaultValueSql("rand_uuid"); - modelBuilder.Entity<CustomerQuery>().HasKey("id"); - - modelBuilder.Entity<Customer>( - b => - { - b.Property(e => e.CustomerID).IsFixedLength(); - }); - - modelBuilder.Entity<Order>( - b => - { - b.Property(e => e.CustomerID).IsFixedLength(); - b.Property(e => e.EmployeeID).HasColumnType("int"); - b.Property(o => o.OrderDate).HasColumnType("datetime"); - }); + entity.HasKey("id"); } }
