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
I have a medium sized application with multiple modules. Two of the modules define similar classes with different collections defined. While class names are same, because the collection names differed, I id not encountered any error. Today I tried to use GenericReferenceField and experienced an error. That was because _document_registry only keeps class names, not the class path. I can think two solutions here.
1- Register by class paths.
2- Throw errors when trying to register a different class with same name.
For backwards compatibility you might do something like this:
Register by path, if path is already registered for another class, throw error
Register by name, if name is already registered, just ignore and override
Have a setting to totally disable "register by name" workflow.
These are my two cents.
The text was updated successfully, but these errors were encountered:
I have a medium sized application with multiple modules. Two of the modules define similar classes with different collections defined. While class names are same, because the collection names differed, I id not encountered any error. Today I tried to use GenericReferenceField and experienced an error. That was because _document_registry only keeps class names, not the class path. I can think two solutions here.
1- Register by class paths.
2- Throw errors when trying to register a different class with same name.
For backwards compatibility you might do something like this:
These are my two cents.
The text was updated successfully, but these errors were encountered: