-
Notifications
You must be signed in to change notification settings - Fork 10
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
Can't load arbitrary object schemas #14
Comments
You can use a PropertyConverter to handle this situation. Take a look at the tests for PropertyConverter for an example of implementing a PropertyConvert and look at documentation on the Converter decorator for information on how to apply them. Also, make sure you are using the latest version, 1.6.2. I noticed a bug where Let me know if you have any questions. |
I'm not sure how to annotate my class to use the PropertyConverter
|
I'm dealing with an existing data-structure that looks like this:
{
'x': {#Schema A}
'y': {#Schema A}
...
}
(where 'x' and 'y' are variable strings)
and I have no way to represent, load or save this data from the Mongo DB with this ORM.
I can't use ': any' or ': Object' or ': {[key: string]: T}'
I know that no collection types are supported except Arrays but this usecase for Dictionaries seems fairly important for a Mongo ORM to handle.
Thanks!
The text was updated successfully, but these errors were encountered: