Comments (2)
I'm not sure why Yugabyte has its own fork of Npgsql, with a special DbConnection of its own; that approach is generally not going to work well with EF (and various other ORMs). For example, you'll also have to override parts of Npgsql.EntityFrameworkCore.PostgreSQL itself so that it doesn't internally instantiate an NpgsqlConnection when given a connection string, but rather a Yugabyte connection. There may be other places as well were such customizations would be needed.
At the end of the day, if Yugabyte created their fork of Npgsql, then it's a different driver, and won't necessarily be compatible with Npgsql; even if we introduce an interface over CloneWith specifically, actual behavioral changes will invariably creep in as Npgsql evolves, which may affect how the EF provider works.
In any case, the dependency on CloneWith specifically is only needed when you use EF to create the database (e.g. with EnsureCreated). If you simply create the database externally (which is what you should be doing anyway in a real app) and refrain from calling EnsureCreated, you shouldn't run into this. Or are you seeing something different?
from efcore.pg.
Thanks for replying! You are spot on that the error was occurring when I was running migrations. It also seems to fail during normal operations for a subset of queries - for example:
System.InvalidOperationException: Npgsql-specific type mapping NpgsqlStringTypeMapping being used with non-Npgsql parameter type NpgsqlParameter
at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping.NpgsqlStringTypeMapping.ConfigureParameter(DbParameter parameter)
at Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping.CreateParameter(DbCommand command, String name, Object value, Nullable`1 nullable, ParameterDirection direction)
At any rate for my use, the unmodified npgsql driver is excellent. I think this is an issue for the Yugabyte people to resolve, if they want to imo.
from efcore.pg.
Related Issues (20)
- EF.Functions.ILIKE falsly translated to LIKE in OR conditioned query HOT 2
- Migration Issue with npgsql 8.0 and Schema Handling for Enum Types HOT 4
- Stop wrapping SaveChanges exceptions with InvalidOperationException HOT 1
- Error when filtering on a JSON column in a split query HOT 4
- Unspecified DateTime can't be saved in JSONB column? HOT 2
- .Where(x => myArr.Contains(x.value)) produces a weird query HOT 2
- Array value converters are incompatible with the compiled model
- Translation of string.Join overload used with List<string> parameter missing HOT 2
- Migrations blocked by: The type mapping for 'JsonElement' has not implemented code literal generation HOT 7
- Operator '+' cannot be applied to operands of type 'Instant' and 'Period' HOT 2
- Parameters don't work with VB.NET HOT 6
- Unable to drop database with EFCore/Npgsql 8.x and PostgreSQL 11.x (42601: syntax error at or near "WITH") HOT 2
- Lack of Default Type Handler for C# short[] to PostgreSQL smallint[] Mapping
- Schema migration code does not support CockroachDB HOT 3
- How can I correctly get NpgsqlDbType for an IProperty? HOT 7
- string.PadLeft and string.PadRight wrong translation HOT 4
- Using NpgsqlDataSourceBuilder with EF Core Provider HOT 4
- Looking for examples of querying tstzrange using NodaTime and EF Core HOT 9
- JsonSerializerOptions are ignored for "Linq to SQL" queries when using NpgsqlDataSourceBuilder.ConfigureJsonOptions HOT 1
- System.InvalidCastException: Writing values of 'NetTopologySuite.Geometries.Point' is not supported for parameters having NpgsqlDbType 'Geometry'. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efcore.pg.