-
Notifications
You must be signed in to change notification settings - Fork 863
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
DynamoDB AOT fails for type and collection properties #3646
Comments
Personally, I don't think it is possible to fully fix without a Source Generator. But it probably should be documented somehow. |
Good catch. You are probably right that a source generator would be the ideal solution but not something we have bandwidth for, at least in the near future. You can work around the issue by adding the [DynamoDBTable("TestTable")]
class TypeWithNestedTypeProperty
{
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(SubType))]
public TypeWithNestedTypeProperty()
{
}
[DynamoDBHashKey]
public string Id { get; set; }
public string Name { get; set; }
public SubType SubType { get; set; }
}
class SubType
{
public string SubName { get; set; }
} |
Regarding specifically collection properties. DynamoDBContext supports very limited set of collection types - Not sure if anything could be done for nested types... |
Why is there no AOT/trim warning generated? Does the library have an invalid warning suppression or did the tooling miss something? |
@MichalStrehovsky Anyway, I've created a discussion at dotnet/runtime, which would potentially allow supporting nested types without a source generator. |
@MichalStrehovsky When the type the user wants to save into DynamoDB is passed into our library I'm using the attribute |
Preview 8 of V4 is out which updates the error message to give user's directions on how to address the issue. |
No, it only includes all the members of the current type. That doesn't include properties' types. |
Originally posted by @Dreamescaper in #3475
The text was updated successfully, but these errors were encountered: