-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nullables Still Acting Up #22
Comments
Weird. 🤔 I will look into it, but it will take some time. Would you mind writing a small Unit Test to reproduce the problem? |
Working on that now |
Without exposing my code too much (working in an Enterprise project), the test should look like this:
Unfortunately running the test against my RDS actually fails :( |
This is obviously an example but should apply to all types, Integer, Numeric, etc. |
Thanks! I will investigate it. Honestly I think about rolling everything back to Npgsql 3.2.7. 😥 |
Got it working. I needed to simply run |
Looking at the test it has to fail, because of this line:
The result should be null. I am not near a computer, so I cannot look into it. 😌 |
Fails before it gets to that line unfortunately. But yea I will patch that in the PR.
Here is the stack FYI |
Meanwhile, please stay on Version 1.3.0 until there is a fix in place. |
This is how Nullables are written. Are you able to spot an obvious error there? |
I looked there first. It should basically use the |
The Npgsql Binary writer has a |
That does fix the issue 😎 |
💪💪💪 I will fix it and release a new version to NuGet. Thanks for your help! |
No problem thanks for your responsiveness :D |
I have released a new Version 2.2.0 to NuGet, which should fix the issue. If the problem still persists, please reopen the ticket. And thanks again! 👍 |
Sorry I was too quick to close! I will add your tests later today in a separate merge. |
Try to run
copyHelper.SaveAll(connection, entities);
Where entities is a list of Student Objects with a string Name field and nullable int field for age.
If the first student in the entities list has a null age and the second has an age defined, it freaks out and fails.
The text was updated successfully, but these errors were encountered: