Commit d55392e
committed
Fix to #21006 - Support a default value for non-nullable properties
Only for scalar properties when projecting Json-mapped entity.
Only need to change code for Cosmos - relational already works in the desired way after the change to streaming (properties that are not encountered maintain their default value)
We still throw exception if JSON contains explicit null where non-nullable scalar is expected.
Fixes #210061 parent ce99d82 commit d55392e
File tree
9 files changed
+1467
-12
lines changed- src/EFCore.Cosmos/Query/Internal
- test
- EFCore.Cosmos.FunctionalTests/Query
- EFCore.InMemory.FunctionalTests
- EFCore.Relational.Specification.Tests/Query
- EFCore.Specification.Tests/Query
- EFCore.SqlServer.FunctionalTests/Query
- EFCore.Sqlite.FunctionalTests/Query
9 files changed
+1467
-12
lines changedLines changed: 26 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
695 | 699 | | |
696 | 700 | | |
697 | 701 | | |
| |||
712 | 716 | | |
713 | 717 | | |
714 | 718 | | |
715 | | - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
716 | 727 | | |
717 | 728 | | |
718 | 729 | | |
719 | 730 | | |
720 | 731 | | |
721 | 732 | | |
722 | 733 | | |
723 | | - | |
| 734 | + | |
| 735 | + | |
724 | 736 | | |
725 | 737 | | |
726 | 738 | | |
| |||
763 | 775 | | |
764 | 776 | | |
765 | 777 | | |
| 778 | + | |
766 | 779 | | |
767 | 780 | | |
768 | 781 | | |
| |||
783 | 796 | | |
784 | 797 | | |
785 | 798 | | |
786 | | - | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
787 | 804 | | |
788 | 805 | | |
789 | 806 | | |
| |||
799 | 816 | | |
800 | 817 | | |
801 | 818 | | |
802 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
803 | 824 | | |
804 | 825 | | |
805 | 826 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments