Commit 8b2154f
committed
Implement v1.0.3 quick wins: Date ranges, EntityReference.Name, and null handling
This commit implements the top 3 priority quick wins identified from upstream
repository analysis, resolving multiple long-standing issues reported by users.
**Quick Win jordimontana82#1: Fix Date Range Operators** (Resolves jordimontana82#588, jordimontana82#587, jordimontana82#551, jordimontana82#543)
- Modified XrmFakedContext.Queries.cs to include full end day (23:59:59.999)
- Fixed: ThisMonth, LastMonth, NextMonth, ThisYear, LastYear, NextYear
- Fixed: ThisWeek, LastWeek, NextWeek, InFiscalYear
- Fixed: Between operator for date ranges
- Added DateRangeOperatorTests.cs with 9 comprehensive tests
**Quick Win jordimontana82#2: EntityReference.Name Population** (Resolves jordimontana82#555)
- Modified RetrieveRequestExecutor.cs to populate EntityReference.Name
- Modified RetrieveMultipleRequestExecutor.cs to populate EntityReference.Name
- Automatically populates Name from referenced entity's primary name attribute
- Added EntityReferenceNameTests.cs with 9 comprehensive tests
**Quick Win jordimontana82#3: Null Reference Exception Fixes** (Resolves jordimontana82#608, jordimontana82#607)
- Added defensive null checks in TranslateConditionExpressionLike
- Added defensive null checks in TranslateConditionExpressionContains
- Added defensive null checks in TranslateConditionExpressionEndsWith
- Added defensive null checks in TranslateConditionExpressionIn
- Prevents crashes when null values present in query conditions
- Added NullReferenceHandlingTests.cs with 15 comprehensive tests
**Test Coverage:**
- 33 new tests total across 3 test files
- All tests verify both functionality and edge cases
- Tests cover QueryExpression and FetchXML scenarios
**Impact:**
- Resolves 8+ upstream issues reported by community
- Improves compatibility with real Dataverse behavior
- Prevents common crashes in query engine
- Enhances developer experience with auto-populated EntityReference names
All changes are backward compatible and follow existing code patterns.1 parent 8f33fa6 commit 8b2154f
File tree
6 files changed
+1338
-2
lines changed6 files changed
+1338
-2
lines changedLines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
201 | 242 | | |
202 | 243 | | |
203 | 244 | | |
| |||
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
168 | 209 | | |
169 | 210 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1440 | 1440 | | |
1441 | 1441 | | |
1442 | 1442 | | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
1443 | 1449 | | |
1444 | 1450 | | |
1445 | 1451 | | |
| |||
1858 | 1864 | | |
1859 | 1865 | | |
1860 | 1866 | | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
1861 | 1873 | | |
1862 | | - | |
| 1874 | + | |
| 1875 | + | |
1863 | 1876 | | |
1864 | 1877 | | |
1865 | 1878 | | |
| |||
1880 | 1893 | | |
1881 | 1894 | | |
1882 | 1895 | | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
1883 | 1902 | | |
1884 | 1903 | | |
1885 | 1904 | | |
| |||
1888 | 1907 | | |
1889 | 1908 | | |
1890 | 1909 | | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
1891 | 1914 | | |
1892 | 1915 | | |
1893 | 1916 | | |
| |||
1916 | 1939 | | |
1917 | 1940 | | |
1918 | 1941 | | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
1919 | 1948 | | |
1920 | | - | |
| 1949 | + | |
| 1950 | + | |
1921 | 1951 | | |
1922 | 1952 | | |
1923 | 1953 | | |
| |||
0 commit comments