Skip to content

Store sentinel values as provider values in the compiled model - #31810

Merged
ajcvickers merged 1 commit into
release/8.0from
230919_NotADrillBit
Sep 20, 2023
Merged

ajcvickers merged 1 commit into
release/8.0from
230919_NotADrillBit

Conversation

@ajcvickers

Copy link
Copy Markdown
Contributor

Fixes #31770

@ajcvickers
ajcvickers requested a review from a team September 19, 2023 17:43
@ajcvickers
ajcvickers merged commit a087ad3 into release/8.0 Sep 20, 2023
@ajcvickers
ajcvickers deleted the 230919_NotADrillBit branch September 20, 2023 09:21
{
var converter = property.GetValueConverter()!;
mainBuilder.Append("new ")
.Append(_code.Reference(valueConverterType))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the compiled model now also supports value converters specified as a lambda expression through the type mapping.
An alternative approach would be to set the provider sentinel value after setting the type mapping and convert it in RuntimeProperty.

ajcvickers added a commit that referenced this pull request Oct 1, 2023
Fixes issue with previous PR pointed out here: #31810 (review)
ajcvickers added a commit that referenced this pull request Oct 3, 2023
Fixes issue with previous PR pointed out here: #31810 (review)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom key types with value converters throw in the compiled model

3 participants