-
-
Notifications
You must be signed in to change notification settings - Fork 89
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 onupdate option in field simply #532
Conversation
Codecov Report
@@ Coverage Diff @@
## master #532 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 185 186 +1
Lines 15298 15368 +70
=========================================
+ Hits 15298 15368 +70
|
Cascade should be another option in field ? @collerek The such like the sqlalchemy, and the
|
Yes, it does. ormar/ormar/fields/foreign_key.py Lines 185 to 196 in 8dc05d5
It's used to populate onupdate and ondelete foreign key options in sqlalchemy foreign key: Lines 242 to 252 in 8dc05d5
Where you pass a string according to sqlalchemy core specification: |
That's in foreignKey only. when the model was updated, something to do auto, such as the otherwise, I have to define the code in model_cls
|
thanks for your suggestions. |
This pr only include the
Please review the #538 first, the |
Can you restore/uncomment |
sorry. I'm on vacation now. Maybe I can create the new pr for bulk-update in a few days. |
Ahh of course. Happy Lunar New Year! 🥳 🎉 No worries it can wait for your come back :) |
Sorry, I forgot something. In Next pr will add the dirty-columns, it can support If this pr has not any other problems, maybe merge it now. |
Before you implement something describe what you want to do. |
Thanks for your advice ! |
@@ -1111,7 +1114,15 @@ async def bulk_update( # noqa: CCR001 | |||
|
|||
columns = [self.model.get_column_alias(k) for k in columns] | |||
|
|||
# on_update_fields = { |
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.
please either update the code or remove it -> we don't want commented out code in the code base
Hi guys why is this PR not merged, I wish there was an onupdate like sqlalchemy. |
onupdate
in field simplybulk-create