Skip to content
This repository was archived by the owner on Jun 16, 2024. It is now read-only.

Update to include till end of day in between dates query#588

Open
Skubakoob wants to merge 1 commit intojordimontana82:masterfrom
Skubakoob:master
Open

Update to include till end of day in between dates query#588
Skubakoob wants to merge 1 commit intojordimontana82:masterfrom
Skubakoob:master

Conversation

@Skubakoob
Copy link

No description provided.

@github-actions
Copy link

github-actions bot commented Feb 1, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@Skubakoob
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@Skubakoob
Copy link
Author

Hmm seems the build is failing because of the last-week bug. I'll try it again tomorrow

TarogStar pushed a commit to TarogStar/fake-xrm-easy that referenced this pull request Nov 11, 2025
…ull 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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants