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

Add embed support for AsChangeSet #4209

Merged
merged 4 commits into from
Aug 28, 2024
Merged

Conversation

vnghia
Copy link
Contributor

@vnghia vnghia commented Aug 27, 2024

This is a copy verbatimly from Insertable. Since the interaction between treat_none_as_default_value and embed isn't allowed in Insertable so it is not allowed here as well.

Closes #1917

@weiznich weiznich requested a review from a team August 27, 2024 12:56
@weiznich
Copy link
Member

Thanks for opening this PR.
Could you also add a test like that one to demonstrate that it works as expected?

Additionally we should document this attribute here. See the relevant documentation on the Insertable derive for an example

Finally that's a great candidate for adding an entry to our Changelog.md file.

@vnghia vnghia marked this pull request as ready for review August 27, 2024 17:22
@vnghia vnghia force-pushed the embed-aschangeset branch from 174269e to 9c68a8a Compare August 27, 2024 18:07
@vnghia
Copy link
Contributor Author

vnghia commented Aug 27, 2024

I think it's ready. Thank you for your pointers. It makes everything become much easier

Copy link
Member

@weiznich weiznich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good now 👍

(I just pushed a minor addition that checks as well that you cannot mix embed + serialize_as)

@weiznich weiznich enabled auto-merge August 28, 2024 11:53
@weiznich weiznich added this pull request to the merge queue Aug 28, 2024
Merged via the queue into diesel-rs:master with commit e741ce5 Aug 28, 2024
48 checks passed
@vnghia vnghia deleted the embed-aschangeset branch August 28, 2024 13:40
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.

Insert Embedded Struct for AsChangeset
2 participants