You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem we're trying to solve is having a converter that allows us to serialize & deserialize derived classes. We currently have a working solution based on this approach, but we've run into some limitations.
We don't want to have to write a custom converter for each subtype, because the types are relatively so like in the linked example we rely on an injected DynamoDbContext.ToEntity<T> to convert each subtype. But we'd like to be able to register the converter for the type on the class property or context like the documentation.
It seems like it should be possible by registering a DdbConverterFactory, but there's no obvious way to go from DynamoDbContextMetadata to a DynamoDbContext. These extension methods also look like they would work, which I think is how the internal ObjectDdbConverter class works, but I don't know what the implications of using those elsewhere would be.
If there's a better way to do what we're trying to do I'd be glad to hear it!
The text was updated successfully, but these errors were encountered:
Hey @bbdaniell, sorry but I'm not really following what are you trying to achieve and why can't you implicitly use the ObjectDdbConverter. Do you mind writing some code examples of what you're trying to achieve so I can think of alternative solution and/or changes required to the library API?
The problem we're trying to solve is having a converter that allows us to serialize & deserialize derived classes. We currently have a working solution based on this approach, but we've run into some limitations.
We don't want to have to write a custom converter for each subtype, because the types are relatively so like in the linked example we rely on an injected
DynamoDbContext.ToEntity<T>
to convert each subtype. But we'd like to be able to register the converter for the type on the class property or context like the documentation.It seems like it should be possible by registering a
DdbConverterFactory
, but there's no obvious way to go fromDynamoDbContextMetadata
to aDynamoDbContext
. These extension methods also look like they would work, which I think is how the internalObjectDdbConverter
class works, but I don't know what the implications of using those elsewhere would be.If there's a better way to do what we're trying to do I'd be glad to hear it!
The text was updated successfully, but these errors were encountered: