Comments (4)
It is the problem of create view, not scaffolding tool.
When I run:
select * from information_schema.columns where table_name = 'terminal';
select * from information_schema.columns where table_name = 'terminal_view';
As we can see, that view columns is_nullable
are YES
, that is not the same as of table.
Following https://stackoverflow.com/questions/17301323/why-are-my-views-columns-nullable, we have a workaround is that update attnotnull
to true
of table pg_attribute
to ensure the nullability of scaffolded view model.
UPDATE pg_attribute
SET attnotnull = true
WHERE attrelid = 'terminal_view'::regclass
from efcore.pg.
@vancodocton do you think there's anything to do here on the EFCore.PG side?
from efcore.pg.
@roji I think it is not necessary.
from efcore.pg.
Thanks.
from efcore.pg.
Related Issues (20)
- [UPGRADE 8.x] NodaTime.Period is not recognised in custom database function HOT 3
- Query fails to translate when used with Owned Types HOT 3
- OwnsOne ToJson HasConversion HOT 1
- Scaffold generates integer[] as List<int> HOT 2
- Jsonb[] mapping not working
- Injecting a DBContext with AddDbContext and UseNpgsql causes it to remain in memory after the scope has been disposed of HOT 4
- GenerateNonNullSqlLiteral not supported on NpgsqlRowValueTypeMapping after ef core 8 upgrade HOT 2
- migration on changed includedPropertyNames for IsGeneratedTsVectorColumn creates up/down code in wrong order
- "integer out of range" error when using date_part in where clause with another conditional HOT 1
- Writing values of 'NpgsqlTypes.NpgsqlRange`1[[System.TimeSpan, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]][]' is not supported for parameters having NpgsqlDbType '-2147483608'. HOT 3
- Error : ''failure to parse near offset 7489. expected an ascii digit,, when runing from EF core .Net 8 HOT 2
- Error : ''failure to parse near offset 7489. expected an ascii digit,, when runing from EF core .Net 8 HOT 5
- Feature Request: protect connection string literal in memory HOT 2
- Support value conversion with generated properties HOT 4
- Running simultaneous queries on different DbContext instances leads to `NpgsqlOperationInProgressException` HOT 3
- Map User Defined Function return table value with parameter timestamp without time zone HOT 3
- Cannot rename system column "xmin" HOT 3
- ISSUE: A PostgreSQL type with the oid '0' was not found in the current database info
- SQL translation error when using LEFT JOIN in `Where` HOT 6
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.