-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Is your feature request related to a problem? Please describe.
Our projects always use the nullable feature, but for some classes like the entities, we still need an empty constructor, so that Entity Framework can create them. This results in this code:
public class MyEntity: : Entity
{
public string NonNullableProperty { get; set; }
#nullable disable warnings
private MyEntity() { /* For EF Core */ }
#nullable enable warnings
}I was hoping to use [NoArgsConstructor] to hide this mess, but the generated file enforces the #nullable enable, which makes Lombok.NET useless in this case.
Describe the solution you'd like
I'd like a way to build an empty constructor with #nullable disable, either with a parameter or another attribute.
[NoArgsConstructor(NullableDisable = true)]
[DeserializerConstructor] (whatever name you see fit)
Describe alternatives you've considered
Unfortunately I'll just have to keep the mess
Metadata
Metadata
Assignees
Labels
No labels