Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent nullability (MayBeNull) when using compositions with modelsbuilder in v9 #11118

Closed
JasonElkin opened this issue Sep 16, 2021 · 1 comment

Comments

@JasonElkin
Copy link
Contributor

Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8

9.0.0-rc003

Bug summary

When using Nullable Reference Types in v9 the System.Diagnostics.CodeAnalysis.MaybeNull attribute seems to be inconsistently applied. It exists on the composition but not the content model itself i.e.

image

Specifics

Here's the generated IPageHeader
image

Here's the actual property on the doctype:
image

Steps to reproduce

  1. Configure ModelsBuilder to use SourceCodeAuto or SourceCodeManual
  2. Create a Composition with a nullable property value.
  3. Apply composition to another content type.
  4. Generate ModelsBuilder models.

Expected result / actual result

Properties on composed content types would have the same MayBeNull attribute as the compositions they implement.

@umbrabot
Copy link

Hi @JasonElkin,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post

Thanks muchly, from your friendly Umbraco GitHub bot :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants