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

Fix: generate relation for related entity of composite foreign key #1693

Merged
merged 2 commits into from Sep 21, 2023

Conversation

billy1624
Copy link
Member

@billy1624 billy1624 commented Jun 7, 2023

PR Info

Bug Fixes

  • [sea-orm-cli] generate relation for related entity of composite foreign key

@billy1624 billy1624 marked this pull request as ready for review June 7, 2023 07:34
Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

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

tldr; LGTM

@dsgallups
Copy link
Sponsor

dsgallups commented Sep 6, 2023

Hello, good people of SeaORM! Is it possible to merge this PR? If not, I'd be happy to contribute to close #1690 , if you would kindly point me in the right direction to make further changes/resolve hiccups encountered in this PR. Thanks!

@@ -139,12 +160,18 @@ impl Relation {
}
}

pub fn get_column_camel_case(&self) -> Ident {
format_ident!("{}", self.columns[0].to_upper_camel_case())
pub fn get_column_camel_case(&self) -> Vec<Ident> {
Copy link
Member

Choose a reason for hiding this comment

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

Ident -> Vec<Ident>

@tyt2y3 tyt2y3 merged commit 9d033d0 into master Sep 21, 2023
72 checks passed
@tyt2y3 tyt2y3 deleted the codegen-composite-fk-relation branch September 21, 2023 18:28
@tyt2y3
Copy link
Member

tyt2y3 commented Sep 21, 2023

Thanks everyone

@github-actions
Copy link

🎉 Released In 0.12.3 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

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

Successfully merging this pull request may close these issues.

Incorrect entity generation for relation with composite keys
3 participants