Skip to content

Document the Insertable embed attribute - #5189

Open
zaveshaa wants to merge 1 commit into
diesel-rs:mainfrom
zaveshaa:docs-insertable-embed
Open

Document the Insertable embed attribute#5189
zaveshaa wants to merge 1 commit into
diesel-rs:mainfrom
zaveshaa:docs-insertable-embed

Conversation

@zaveshaa

@zaveshaa zaveshaa commented Sep 3, 2026

Copy link
Copy Markdown

References #4840 (one attribute checkbox)

Adds a focused derive test and snapshot for #[diesel(embed)] on #[derive(Insertable)], and wires the generated example into the API docs (mirroring the existing insertable_1 / insertable_table_name_1 examples).

The snapshot shows that the embedded field (post: Post) is inserted wholesale into the values tuple as the nested Post Insertable.

Verified with: cargo test -p diesel_derives --lib tests::insertable::insertable_embed_1 (passes).

Add a focused derive test and snapshot for #[diesel(embed)] on
Insertable, and wire the generated example into the API docs.
@weiznich
weiznich requested a review from a team September 5, 2026 09:48
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.

1 participant