simpleidserver / EFCore.Cassandra

Entity Framework Core provider for Cassandra
Apache License 2.0
35 stars 16 forks source link

add-migration error in "release/2.0.0" #7

Closed SinDotBe closed 3 years ago

SinDotBe commented 4 years ago

I have received "The current CSharpHelper cannot scaffold literals of type 'Microsoft.EntityFrameworkCore.CassandraClusteringOrderByOption'. Configure your services to use one that can".

when set modelBuilder.Entity<Applicant>().ForCassandraSetClusteringOrderBy(new[] { new CassandraClusteringOrderByOption("Id", CassandraClusteringOrderByOptions.ASC) });

in OnModelCreating.

simpleidserver commented 4 years ago

The migration error is fixed : https://github.com/simpleidserver/medikit/commit/cf338406afdb03c410fbc5e8edc096cf2d72f93f

In the Applicant table, the id column is defined as a partition key.

You should use Order column because it's defined as a cluster column.