Fix bug with NullComparisonRewriter - #495
Closed
SergeiPavlov wants to merge 9 commits into
Closed
Conversation
The ORM's own DbCommandExecuting/Executed events only fire for commands run through its own execution path, and there was no hook for a connection's first genuine open or for a raw connection handed out without a DbCommand. Code using DirectSqlAccessor, or needing the raw connection directly, had no way to observe any of this. Adds a DbConnectionOpened event fired on the Closed to Open transition, an EventNotifyingDbCommand wrapper so DirectSqlAccessor.CreateCommand() raises the same execute events ORM commands do, and an async GetConnectionAsync with an awaitable raw-connection-accessed hook so callers that need the connection itself can hook in without blocking a thread.
Five workflows still built Orm.sln, which was removed by the .slnx migration (#386), so every push to master-servicetitan has been failing CI with MSB1009. Points all of them at Orm.slnx instead.
The gawk pattern expected a 4-part version (x.y.z.w) to find a build number to increment, but Version.props now uses a 3-part scheme (e.g. 7.3.24), so it silently matched nothing and left the file unchanged. Matches through the second dot and increments the patch component instead.
fix CI build workflows to reference Orm.slnx
SergeiPavlov
force-pushed
the
master-servicetitan
branch
from
August 5, 2026 18:21
1f127aa to
3ff3d23
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NullComparisonRewriterincorrectly processes nullable enumFor example following line in a materializer:
JobStatus = r.Job != null ? r.Job.Status : nullsometime assigns
default(JobStatus)instead ofnull(when r.Job == null)This depends on
State.IsTailMethodflag which activatesNullComparisonRewriter.Adding
.Tag()can change the behavior.or
query.ToList().First()andquery.First()have different behavior.This PR turns off
NullComparisonRewriteroptimization until we find how to improve itAlso:
MaterializeNullableEnumtest for this case.