Cryptic error message for ID field problem
See original GitHub issueI got the following error: “Object reference not set to an instance of an object” when bulk inserting objects.
It took some time to figure out, that the problem is that the Id
field has only a getter, but no setter.
Like:
public int Id { get; }
This fixed it:
public int Id { get; set; }
Would it be possible to display a user friendly error in this case? thx
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Why am I receiving cryptic error messages when ...
My virtual connection runs a custom SQL query from Oracle. When I attempt to extract the data, I receive email notifications of failure...
Read more >Cryptic error when defining a mutation without ...
In this case I've added the following mutation query to relay and I've received a cryptic error, I cannot find any reference to...
Read more >Designing Better Error Messages UX
They provide a very general statement explaining that the input is wrong, with plenty of floral and cryptic words along with it.
Read more >Builds fail with cryptic message - Developer Community
This error started occurring without me doing any changes to my project, and it persists for more than a week: ##[error]An error occurred...
Read more >RocksDB cryptic error message
This is an assertion failure raised by RocksDB, and it intentionally terminates the execution of the program.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @bolner, just wanted to let you know that it will be possible in a future release of v5. Functionality has been added in commit d65b888a69c6dd6112df1d6644f0fa080711229b (pushed about 20 mins ago) and will be available in the next release of v5.
Therefor, I’ll be closing the issue if you don’t mind. Feel free to re-open the issue if you feel like it’s still needed.
Hi, the following code reproduces it. When the setter is given, then LiteDB automatically puts an auto-increment ID into the Id field.
This is the exact exception: