+
Skip to content

Conversation

Expurple
Copy link
Member

@Expurple Expurple commented Apr 30, 2025

PR Info

  • Closes: none
  • Dependencies: none
  • Dependents: none

New Features

  • impl IntoCondition for RelationDef.

    This allows using RelationDef directly, wherever sea_query expects an IntoCondition type:

    let query = Query::select()
        .from(fruit::Entity)
        .inner_join(cake::Entity, fruit::Relation::Cake.def())
        .to_owned();

    As well as generating the JOIN condition explicitly:

    fruit::Relation::Cake.def().into_condition()

I was very surprised when I couldn't do this. Generating JOIN conditions from RelationDef is obviously already implemented. The existing implementation just wasn't public and wan't using this trait.

Bug Fixes

Breaking Changes

Changes

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.

thank you

@tyt2y3 tyt2y3 merged commit 1e0b5b8 into SeaQL:master May 7, 2025
36 checks passed
Copy link

github-actions bot commented May 7, 2025

🎉 Released In 1.1.11 🎉

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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载