Skip to content

Commit

Permalink
DerivePartialModel macro attribute entity supports syn::Type as…
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Apr 10, 2024
1 parent 2dda428 commit 7775e78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SeaORM/docs/08-advanced-query/01-custom-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ You can define a partial model, and the corresponding columns will be automatica
```rust
#[derive(DerivePartialModel, FromQueryResult)]
#[sea_orm(entity = "User")]
// `DerivePartialModel` macro attribute `entity` supports `syn::Type` as well
#[sea_orm(entity = "<entity::Model as ModelTrait>::Entity")]
struct PartialUser {
pub id: i32,
pub avatar: String,
Expand Down

0 comments on commit 7775e78

Please sign in to comment.