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

Implement "Nest" for DerivePartialModel and From QueryResult #1716

Closed
wants to merge 15 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🎨 cargo fmt
Goodjooy committed Jun 21, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 9df21b773c0d6bdc9ce4b38416d6c7956c1f1200
12 changes: 6 additions & 6 deletions sea-orm-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -596,16 +596,16 @@ pub fn derive_active_enum(input: TokenStream) -> TokenStream {
/// use sea_orm::{entity::prelude::*, FromQueryResult};
///
/// #[derive(Debug, FromQueryResult)]
/// struct Foo{
/// bar: i64
/// struct Foo {
/// bar: i64,
/// }
///
/// #[derive(Debug, FromQueryResult)]
/// struct SelectResult {
/// name: String,
/// num_of_fruits: i32,
/// #[sea_orm(flatten)]
/// foo: Foo
/// foo: Foo,
/// }
/// ```
#[cfg(feature = "derive")]
@@ -809,13 +809,13 @@ pub fn derive_from_json_query_result(input: TokenStream) -> TokenStream {
/// #[sea_orm(from_expr = "Expr::val(1).add(1)")]
/// sum: i32,
/// #[sea_orm(flatten)]
/// foo: Foo
/// foo: Foo,
/// }
///
/// #[derive(Debug, FromQueryResult, DerivePartialModel)]
/// struct Foo{
/// struct Foo {
/// #[sea_orm(from_expr = "Expr::val(12).add(2)")]
/// bar: i64
/// bar: i64,
/// }
/// ```
/// Note: the `flatten` cannot use with `from_expr` or `from_col`,