JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.75k stars 429 forks source link

Invalid id of type string for document type Xyz #3236

Closed TatChu closed 2 months ago

TatChu commented 2 months ago

I'm trying to use the revision approach for the concurrency problem. This is my entity

public class public class Notification : IRevisioned
{
    public string Id { get; set; }
   // other props
    public int Version { get; set; }
}

Then when updating the document, I got this exception Marten.Exceptions.DocumentIdTypeMismatchException: Invalid id of type string for document type Domain.Notification. Unsure what went wrong with the above code?

Version: 7.16.0

jeremydmiller commented 2 months ago

@TatChu Can you please use Discord for questions in the future?

Did you change this document at some point in time? Do you possibly have stale versions of pre-generated code around?