-
Notifications
You must be signed in to change notification settings - Fork 639
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
Wrong table annotations for models with same name, but different tables #674
Comments
Looks like a fix for this might be adding an explicit |
drwl
pushed a commit
that referenced
this issue
May 8, 2020
Currently, the models annotator automatically attempts to find a class with a matching name at the bottom of project's directory tree before going up into specific engine's models. This causes issues with models that share names with classes in other engines or lower classes in the project's directory. This PR adds the option to skip attempts to load classes from lower directories and just uses the model's file path directly. #674
We've got the same issue, and this doesn't work for us :( |
ocarta-l
pushed a commit
to ocarta-l/annotate_models
that referenced
this issue
Jun 18, 2021
Currently, the models annotator automatically attempts to find a class with a matching name at the bottom of project's directory tree before going up into specific engine's models. This causes issues with models that share names with classes in other engines or lower classes in the project's directory. This PR adds the option to skip attempts to load classes from lower directories and just uses the model's file path directly. ctran#674
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe your problem here.
Two different models, both with the same class name. One is inside a Rails engine inside the app, the other inside the main rails app. They are pointing to different underlying PostGres tables.
When running model annotations, both models show the annotations for the model inside the main app.
The expected result should be the model inside the main app has annotations representing it's underlying table and the model inside the engine has a different set of annotations representing it's underlying table.
Commands
Version
2.7.5
5.2.3
2.6.2p47
The text was updated successfully, but these errors were encountered: