Skip to content

Commit c6c5bf1

Browse files
committed
[Blog] Edit
1 parent 233dbbe commit c6c5bf1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Blog/blog/2024-08-04-sea-orm-1.0.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,19 @@ struct EntityNameNotAIdent {
167167

168168
* [#2146](https://github.com/SeaQL/sea-orm/pull/2146) Added `RelationDef::from_alias()`
169169
```rust
170+
#[derive(DeriveIden)]
171+
pub struct Cf;
172+
170173
assert_eq!(
171174
cake::Entity::find()
172175
.join_as(
173176
JoinType::LeftJoin,
174177
cake_filling::Relation::Cake.def().rev(),
175-
cf.clone()
178+
Cf
176179
)
177180
.join(
178181
JoinType::LeftJoin,
179-
cake_filling::Relation::Filling.def().from_alias(cf)
182+
cake_filling::Relation::Filling.def().from_alias(Cf)
180183
)
181184
.build(DbBackend::MySql)
182185
.to_string(),

0 commit comments

Comments
 (0)