Skip to content

Enumerate duplicate model names #1212

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tjb346
Copy link

@tjb346 tjb346 commented Mar 4, 2025

This addresses: #652

Even with use_path_prefixes_for_title_model_names set to true, duplicate model class names can occur. By default, when duplicates are encountered they will be skipped. This can cause error when they are referenced later.

This PR enables setting enumerate_duplicate_model_names to true (false by default) in the config file which will result in a number being added to duplicate names starting with 1. For instance, if there are multiple occurrences in the schema of MyModelName, the initial occurrence will remain MyModelName and subsequent occurrences will be named MyModelName1, MyModelName2 and so on.

The existing test_model_name_conflict test is updated to account for this new config option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant