Skip to content
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

QueryBean generation - use full class names for TQRootBean, TQAssocBean #3280

Merged
merged 3 commits into from Nov 28, 2023

Conversation

rbygrave
Copy link
Member

Rather than imports, such that these are not possible name clashes with beans of the exact same name.

Rather than imports, such that these are not possible name clashes with
beans of the exact same name.
@jnehlmeier
Copy link

Don't you think that all EBean API classes should be full qualified in generated code? As soon as there is an import to any Ebean API class, that class name can not be used as entity name.

Looking at the current file there is Constants.AVAJE_LANG_NULLABLE and Constants.DB also in importTypes. Not sure about Avaje Nullable as it is an annotation but DB could still be a problem.

@rbygrave
Copy link
Member Author

Don't you think that all EBean API classes should be full qualified in generated code?

Well there is a requirement that the generated code is "pretty readable" for humans to read. We probably should fully qualify DB use. I feel we should detect a name clash with property types and conditionally import in order to assist readability of the query beans just a little bit.

If there is an entity bean short name clash like PString, PLong, etc then
fully qualify all the property types in the generated code, otherwise use
imports for the property types.
@rbygrave rbygrave merged commit 455a9fd into master Nov 28, 2023
2 checks passed
@rbygrave rbygrave deleted the feature/typequery-imports-tqrootbean branch November 28, 2023 12:21
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

2 participants