Permit passing custom derives to ActiveModelEx
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.9k
- Forks
- 734
- Avg merge
- 6h 36m
- Merged PRs (30d)
- 8
Description
Motivation
I'm trying to get the dioxus Store derive to work on the same struct as a sea_orm::model derive so i can use the same struct for reactive data stores and also database insert queries.
Proposed Solutions
PR #2933 already permits derives to pass to Model and ModelEx, via either normal derive syntax or model_attrs. I think the best solution here is to expand this system to all other auto-generated structs, eg active_model_ex_attrs. extra derives on the entire struct will pass to all autogenerated structs, and there will also be the attrs thing for finer grain control
Additional Information
I was planning on writing this myself and PRing the fix, but I also felt it would be better to submit an issue before doing that so yall can see this.
My current barebones proof of concept:
https://github.com/SeaQL/sea-orm/commit/b3827a752b8f5c73b494ca1e82c49f288643276a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PR #2933 and the existing Model and ModelEx derive handling, then trace how ActiveModelEx and the other autogenerated structs are produced. The work is complete when custom derives can be passed to ActiveModelEx, including the proposed active_model_ex_attrs-style per-struct control, with coverage for the supported derive forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100