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

document how to work with generated columns #11834

Open
wants to merge 1 commit into
base: 2.20.x
Choose a base branch
from

Conversation

dbu
Copy link
Member

@dbu dbu commented Feb 12, 2025

while all relevant attributes are in the reference, it is not obvious how to work with generated columns.

this is an attempt to explain how to work with them with some examples.

this would answer #10706

@dbu dbu force-pushed the document-generated-columns branch from ae6a9e1 to a0780a8 Compare February 12, 2025 09:44
Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could retarget to 2.x

@dbu
Copy link
Member Author

dbu commented Feb 15, 2025

I think you could retarget to 2.x

i was wondering. happy to do that. would that be the 2.21.x branch? i do not see a 2.x branch.

@dbu dbu force-pushed the document-generated-columns branch from 2381482 to b0d794a Compare February 15, 2025 10:23
@dbu
Copy link
Member Author

dbu commented Feb 15, 2025

does the CI provide a preview somewhere so i can check if anything is rendered incorrectly?

@greg0ire
Copy link
Member

2.20.x, and there is no preview, but you can generate the html locally by doing what the ci does

Comment on lines 25 to 28
expressed with Doctrine mapping. ``columnDefinition`` specifies the full SQL
to create the column. To allow to use database specific features, this
attribute does not use DQL. Note that we use the database column names with
snake_case to reference the fields, and not the entity fields with camelCase.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes a lot of assumptions on configuration and is also not very clear in some parts. Can you re-read this a few times and simplify?

Snake Case vs Camel Case depends on how the naming strategy is configured. Default behavior is not the Symfony behavior.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh, i was not aware that snake_case is not the default strategy. i changed the example and adjusted the text to explain things without assumptions. better?

@dbu dbu force-pushed the document-generated-columns branch from b0d794a to 712e912 Compare February 17, 2025 13:38
@dbu dbu changed the base branch from 3.3.x to 2.20.x February 17, 2025 13:38
@dbu dbu force-pushed the document-generated-columns branch from 712e912 to 285c6cc Compare February 17, 2025 14:04
@dbu dbu force-pushed the document-generated-columns branch from 285c6cc to 8ce7b31 Compare February 17, 2025 14:06
@dbu
Copy link
Member Author

dbu commented Feb 17, 2025

2.20.x

i changed the branch and target of this merge request.

@greg0ire greg0ire requested a review from beberlei February 18, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants