-
-
Notifications
You must be signed in to change notification settings - Fork 598
sea-orm-cli: allow skipping impl ActiveModelBehavior for generated entities #1947
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
Conversation
The current state of this PR only adds the CLI flag that maintains the current default behavior and updates |
I think this is an excellent solution. |
Something I didn't realize when I opened this PR is that it may be a little problematic since it's all-or-nothing whereas it may be desirable for the empty impl blocks to exist for some of the generated entities since some |
The implementation looks good, and this feature is definitely useful! |
Hi this great, much needed, can we merge this? |
@waynr do you have anything to amend? I can probably merge it as is |
Any updates? |
Oh I don't have any additional changes. Sorry, I lost track of this after I started a new job earlier this year. |
4e74dde
to
c512541
Compare
I've rebased onto master branch and resolved the merge conflict so this should be ready to merge. |
When will it be updated? I really need this. |
@@ -1667,6 +1706,29 @@ mod tests { | |||
}) | |||
.to_string() | |||
); | |||
assert_eq!( | |||
>>>>>>> 4e74dde0 (sea-orm-cli: allow skipping impl ActiveModelBehavior for generated entities) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several merge artifacts throughout this PR that should be cleaned up beforehand - but it would be great to see this merged in soon!
closed in favor of #2487 thank you all |
This PR adds an option that enables users to skip generating the
by passing the
--gen-impl-active-model-behavior false
flag tosea-orm-cli generate entity
.This is intended to allow for an easy and idiomatic-for-rust alternative to #1931 which I described in more detail in a related discussion post
I don't necessarily think this should close out #1931, but I do think that the complexity of the solution described in that issue merits some consideration given the available alternative.