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
feat(cloud_firestore_odm): add support for specifying class name prefix #9453
feat(cloud_firestore_odm): add support for specifying class name prefix #9453
Conversation
I think another important thing to do for #9452 is to throw an error if the same Model is used on multiple collections. Could you add that? |
packages/cloud_firestore_odm/cloud_firestore_odm_generator/pubspec.yaml
Outdated
Show resolved
Hide resolved
Outside of error handling, LGTM |
I'm not sure what you mean. Do you mean throw an exception if the same model is used on multiple root collections? |
Yes. If multiple Of course, specifying the added "prefix" parameter would disable this exception |
packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/collection_generator.dart
Outdated
Show resolved
Hide resolved
LGTM thanks! |
Description
Allows developers to specify the name prefix used for generated classes. This allows for reusing the same data class in multiple sub collections on the same parent collection.
Related Issues
#9452
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process. Updating the
pubspec.yaml
and changelogs is not required.///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?