Comments (3)
I notice your entity has the following attribute
[Column("allowed_time_ranges", TypeName = "timerange[]")]
public NpgsqlRange<TimeSpan>? AllowedTimeRanges { get; set; }
Specifically timerange[]
while the clr type is not an array/list. Can you remove []
and try again?
from efcore.pg.
@roji this might be related to https://github.com/npgsql/npgsql/pull/5123/files#r1325747341
If so setting the actual datatypename of the range on the param should solve it.
EDIT: traced the regstration to
which suggests that's already happening. Not sure how we end up with ais not supported for parameters having NpgsqlDbType
kind of error. That only happens if it was set somehow.from efcore.pg.
@NinoFloris
Thanks for answer.
@roji What do you think?
I'm sorry. The issue is actually related to array of ranges NpgSqlRange<TimeSpan>[]
. So the entity class should look like this.
public class RestrictionSettings
{
[Column("id")]
public Guid Id { get; set; }
[Column("allowed_time_ranges", TypeName = "timerange[]")]
public NpgsqlRange<TimeSpan>[]? AllowedTimeRanges { get; set; }
}
Usual NpgSqlRange<TimeSpan>
works fine.
public class RestrictionSettings
{
[Column("id")]
public Guid Id { get; set; }
[Column("allowed_time_ranges", TypeName = "timerange")]
public NpgsqlRange<TimeSpan> AllowedTimeRanges { get; set; }
}
Is it possible to use array(NpgsqlRange[]) now in 8.02 version?
Btw, NpgsqlRange<DateTime>[]
works well without specifying custom range type. But for the NpgsqlRange<TimeSpan>[]
it's not
from efcore.pg.
Related Issues (20)
- Remove direct dependency on Microsoft.EntityFrameworkCore.Abstractions HOT 1
- List Of List to JsonB .Net 8 HOT 16
- DROP DATABASE WITH (FORCE) fails on 11.8 HOT 2
- parameters type mapping to the user-defined function HOT 4
- Does npgsql support 'IS DISTINCT FROM' and 'IS NOT DISTINCT FROM' when building query using System.Linq.Expressions? HOT 4
- Question: SQL LEFT JOIN clause varies based on declarative- vs. method-style join HOT 1
- Fully support extensions create in non-default schemas
- Make the enumName parameter in NpgsqlDbContextOptionsBuilder.MapEnum<T>() optional. HOT 7
- How to prefix an update statement with a SET, whilst maintaining DbConcurrencyException logic HOT 3
- All migrations detected as Pending if you don't have a versioned public schema.
- EntityTypeBuilder.HasCluster(string indexName) HOT 1
- Remove-Migration throws System.NullReferenceException when using NpgsqlRange<DateTimeOffset>
- Drop custom collation in EF migration rollback
- Translate range construction, e.g. NpgsqlRange<DateTime> to daterange() HOT 2
- Updating a datetime property through ExecuteUpdateAsync() forces the datetime to be UTC? HOT 4
- Look into TimescaleDB support
- Method 'get_ConstructorExpression' in type 'JsonBigIntegerReaderWriter' from assembly 'Npgsql.EntityFrameworkCore.PostgreSQL' does not have an implementation. HOT 7
- Slow performance on string contains expression. HOT 23
- Error while Querying scalar with context.Database function HOT 4
- ENUMs don't use fully qualified namespaces in ModelSnapshot which causes collisions HOT 2
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.