Comments (2)
Workaround is to just specify the column-name explicitly:
map.Map(x => x.ActivityType, "activity_type").NotNull();
map.Map(x => x.CustomerId, "customer_id");
But it still fails at runtime with:
23502: null value in column "activity_type" of relation "import_history" violates not-null constraint
DETAIL: Failing row contains (51a74c7b-f5da-4790-98d8-12b950f26014, null, null, 0, null, working, 0, 3, null).
---> Npgsql.PostgresException (0x80004005): 23502: null value in column "activity_type" of relation "import_history" violates not-null constraint
Removing the NotNull()
constraint makes it run -- but the NotNull
can make sense to have (depending on busines case).
from marten.
I'm switching the naming strategy to using Posgresql friendly snake casing. Dumb mistake on my part.
Projections need to run pretty simply, and there's very little recourse for error handling other than to retry a page of events or pause the projection for manual intervention. Using any kind of database constraint that can fail from bad data has had adverse effects and can make your system brittle.
from marten.
Related Issues (20)
- Fix NodaTime Select(Instant) serialization. Again. HOT 1
- [BUG] Schemas not autoregenerate in development (or even in prod) HOT 1
- Sample for CustomGrouper is not robust
- NpgsqlDataSource - System.ObjectDisposedException : The semaphore has been disposed. HOT 2
- MultiStreamProjection - Identity does not support IEvent<TEvent> as identity source
- MultiStreamProjection - as async projection does not execute apply method when a lot of pending events HOT 4
- Overhaul Command Execution Pipeline HOT 6
- MultiStreamProjection is not supported with QueryAllRawEvents().AggregateTo<>()
- QueryAllRawEvents().AggregateTo() does not set document Id field
- AddMartenStore<T> throws System.InvalidOperationException: This service descriptor is keyed. Your service provider may not support keyed services.
- Gin index creating broken migration in v7 Beta 3 HOT 3
- StackOverflow from LINQ query in v7 HOT 1
- Count + Hashset exception in v7 HOT 1
- Dynamic code generation fails occasionaly on a list messages that use a Marten aggregate and thus trigger code generation in parallel
- Add a testing helper package HOT 1
- Need clarification: Marten keeps regenerating code already generated when using TypeLoadMode.Auto
- Open Telemetry Support HOT 4
- Dynamic Tenant Database Discovery HOT 1
- Selecting into a dictionary with an object array value causes null ref (v7)
- QueryAllRawEvents throws exception when attempting deserialize headers (v7)
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 marten.