Skip to content

Commit

Permalink
[Blog] Edit
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Aug 4, 2024
1 parent 233dbbe commit c6c5bf1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Blog/blog/2024-08-04-sea-orm-1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,19 @@ struct EntityNameNotAIdent {

* [#2146](https://github.com/SeaQL/sea-orm/pull/2146) Added `RelationDef::from_alias()`
```rust
#[derive(DeriveIden)]
pub struct Cf;

assert_eq!(
cake::Entity::find()
.join_as(
JoinType::LeftJoin,
cake_filling::Relation::Cake.def().rev(),
cf.clone()
Cf
)
.join(
JoinType::LeftJoin,
cake_filling::Relation::Filling.def().from_alias(cf)
cake_filling::Relation::Filling.def().from_alias(Cf)
)
.build(DbBackend::MySql)
.to_string(),
Expand Down

0 comments on commit c6c5bf1

Please sign in to comment.