Skip to content

fix: mark a property generated if it is STORED or VIRTUAL #608

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

Merged
merged 1 commit into from
May 27, 2025

Conversation

aaqilniz
Copy link
Contributor

@aaqilniz aaqilniz commented Sep 1, 2024

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • Commit messages are following our guidelines

@aaqilniz aaqilniz force-pushed the fix/generated-properties branch 2 times, most recently from 7f5c02f to de1c74f Compare September 1, 2024 07:35
@aaqilniz aaqilniz marked this pull request as ready for review November 9, 2024 12:14
Copy link
Member

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

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

@aaqilniz, I'm not familiar with mysql, hope my comment make sense. Thanks.

@@ -181,7 +188,14 @@ function mixinDiscovery(MySQL, mysql) {
' numeric_scale AS "dataScale",' +
' column_type AS "columnType",' +
' is_nullable = \'YES\' AS "nullable",' +
' CASE WHEN extra LIKE \'%auto_increment%\' THEN 1 ELSE 0 END AS "generated"' +
`
case
Copy link
Member

Choose a reason for hiding this comment

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

If there's GENERATED ALWAYS when using VIRTUAL or STORED, should we check for that?

Also could you please make the syntax consistent? i.e. for line 193:

 WHEN extra LIKE '%virtual%' THEN 1

Copy link
Member

Choose a reason for hiding this comment

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

@aaqilniz, are you interested to continue to pursue with this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @dhmlau. I will update the PR soon and notify you for the review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @dhmlau. I have just made a quick update. Can you please have a look at the PR?

Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
@aaqilniz aaqilniz force-pushed the fix/generated-properties branch from de1c74f to 0815121 Compare May 25, 2025 15:16
@dhmlau dhmlau requested a review from samarpanB May 25, 2025 20:39
@dhmlau dhmlau merged commit 902ee9e into loopbackio:master May 27, 2025
6 checks passed
@aaqilniz aaqilniz deleted the fix/generated-properties branch May 28, 2025 15:16
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.

2 participants